feat(frontend): discord registration/login/linking

also moves the registration form found on the mastodon callback page
into a component so we're not repeating the same code for every auth method
This commit is contained in:
sam 2024-11-28 21:35:55 +01:00
parent 4780be3019
commit de733a0682
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
19 changed files with 545 additions and 212 deletions

View file

@ -1,4 +1,4 @@
import type { User } from "./user";
import type { AuthType, User } from "./user";
export type AuthResponse = {
user: User;
@ -21,3 +21,10 @@ export type AuthUrls = {
google?: string;
tumblr?: string;
};
export type AddAccountResponse = {
id: string;
type: AuthType;
remote_id: string;
remote_username?: string;
};

View file

@ -16,4 +16,5 @@ export type Limits = {
member_count: number;
bio_length: number;
custom_preferences: number;
max_auth_methods: number;
};

View file

@ -71,9 +71,11 @@ export type PrideFlag = {
description: string | null;
};
export type AuthType = "DISCORD" | "GOOGLE" | "TUMBLR" | "FEDIVERSE" | "EMAIL";
export type AuthMethod = {
id: string;
type: "DISCORD" | "GOOGLE" | "TUMBLR" | "FEDIVERSE" | "EMAIL";
type: AuthType;
remote_id: string;
remote_username?: string;
};