diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2018-11-15 19:15:04 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2018-11-15 19:15:04 +0900 |
| commit | 9d8f7b081d8c47027583b3085923e2128f622b98 (patch) | |
| tree | badb8b660018fd4967b946cbe65d48650b88110f /src/models | |
| parent | 10.51.2 (diff) | |
| download | misskey-9d8f7b081d8c47027583b3085923e2128f622b98.tar.gz misskey-9d8f7b081d8c47027583b3085923e2128f622b98.tar.bz2 misskey-9d8f7b081d8c47027583b3085923e2128f622b98.zip | |
WIP: Add Discord auth (#3239)
* Add Discord auth
* Apply review 175263424
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/meta.ts | 4 | ||||
| -rw-r--r-- | src/models/user.ts | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/models/meta.ts b/src/models/meta.ts index a12747ea3c..34117afd25 100644 --- a/src/models/meta.ts +++ b/src/models/meta.ts @@ -191,4 +191,8 @@ export type IMeta = { enableGithubIntegration?: boolean; githubClientId?: string; githubClientSecret?: string; + + enableDiscordIntegration?: boolean; + discordClientId?: string; + discordClientSecret?: string; }; diff --git a/src/models/user.ts b/src/models/user.ts index a5863de8da..22eecb571b 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -88,6 +88,14 @@ export interface ILocalUser extends IUserBase { id: string; login: string; }; + discord: { + accessToken: string; + refreshToken: string; + expiresDate: number; + id: string; + username: string; + discriminator: string; + }; line: { userId: string; }; @@ -291,6 +299,11 @@ export const pack = ( if (_user.github) { delete _user.github.accessToken; } + if (_user.discord) { + delete _user.discord.accessToken; + delete _user.discord.refreshToken; + delete _user.discord.expiresDate; + } delete _user.line; // Visible via only the official client |