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:
parent
4780be3019
commit
de733a0682
19 changed files with 545 additions and 212 deletions
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -16,4 +16,5 @@ export type Limits = {
|
|||
member_count: number;
|
||||
bio_length: number;
|
||||
custom_preferences: number;
|
||||
max_auth_methods: number;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue