WIP: Add Discord auth (#3239)

* Add Discord auth

* Apply review 175263424
This commit is contained in:
Acid Chicken (硫酸鶏) 2018-11-15 19:15:04 +09:00 committed by syuilo
parent a34fdc2068
commit 9d8f7b081d
17 changed files with 522 additions and 4 deletions

View file

@ -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