mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-13 10:52:53 +00:00
feat: add support for multiple access token provider
This commit is contained in:
@@ -19,7 +19,7 @@ export default class User {
|
||||
}
|
||||
|
||||
get accessToken(): string {
|
||||
return this._model.accessToken;
|
||||
return this._model.accessTokens.github;
|
||||
}
|
||||
|
||||
get photo(): string {
|
||||
|
||||
@@ -2,7 +2,9 @@ import * as mongoose from "mongoose";
|
||||
const { Schema } = mongoose;
|
||||
|
||||
const UserSchema = new Schema({
|
||||
accessToken: String,
|
||||
accessTokens: {
|
||||
github: { type: String },
|
||||
},
|
||||
username: {
|
||||
type: String,
|
||||
index: { unique: true },
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import * as mongoose from "mongoose";
|
||||
|
||||
export interface IUser {
|
||||
accessToken: string;
|
||||
accessTokens: {
|
||||
github: string;
|
||||
};
|
||||
|
||||
username: string;
|
||||
email: string;
|
||||
|
||||
Reference in New Issue
Block a user