Enforcing user settings type restriction

This commit is contained in:
Ewout Stortenbeker 2020-10-22 12:04:54 +02:00
parent c1e80f5678
commit ebf4b0819c
3 changed files with 3 additions and 3 deletions

View file

@ -90,7 +90,7 @@ class SpotifyAuthProvider {
premium: user.product === 'premium',
followers: user.followers ? user.followers.total : null,
country: user.country,
external_urls: user.external_urls,
// external_urls: user.external_urls,
uri: user.uri
}
};

View file

@ -21,7 +21,7 @@ export interface IOAuth2TokenResult {
export interface IOAuth2Provider {
init(options: { redirect_url: string, state?: string }): Promise<string>
getAccessToken(params: IOAuth2AuthCodeParams | IOAuth2RefreshTokenParams): Promise<IOAuth2TokenResult>
getUserInfo(access_token: string): Promise<{ id: string, name: string, display_name: string, picture?: Array<{ width?: number, height?: number, url: string }>, email: string, email_verified: boolean, other?: { [key:string]: any } }>
getUserInfo(access_token: string): Promise<{ id: string, name: string, display_name: string, picture?: Array<{ width?: number, height?: number, url: string }>, email: string, email_verified: boolean, other?: { [key:string]: string|number|boolean } }>
}
// For OAuth2.0 providers with id_token in getAccessToken, see https://auth0.com/docs/tokens/concepts/jwts
export interface IOpenIDToken {

View file

@ -114,7 +114,7 @@ export class SpotifyAuthProvider implements IOAuth2Provider {
premium: user.product === 'premium',
followers: user.followers ? user.followers.total : null,
country: user.country,
external_urls: user.external_urls,
// external_urls: user.external_urls,
uri: user.uri
}
}