mirror of
https://github.com/Dan6erbond/sk-auth.git
synced 2024-11-25 19:05:46 +01:00
🏷️ Make OAuth2ProviderConfig.scope
and params
optional for better type inference in client applications
This commit is contained in:
parent
1b3c804590
commit
d64d9f1807
@ -10,10 +10,10 @@ export interface OAuth2ProviderConfig<ProfileType = any, TokensType extends OAut
|
||||
profileUrl?: string;
|
||||
clientId?: string;
|
||||
clientSecret?: string;
|
||||
scope: string | string[];
|
||||
scope?: string | string[];
|
||||
headers?: any;
|
||||
authorizationParams?: any;
|
||||
params: any;
|
||||
params?: any;
|
||||
grantType?: string;
|
||||
responseType?: string;
|
||||
contentType?: "application/json" | "application/x-www-form-urlencoded";
|
||||
@ -43,7 +43,7 @@ export class OAuth2Provider<
|
||||
nonce,
|
||||
response_type: this.config.responseType,
|
||||
client_id: this.config.clientId,
|
||||
scope: Array.isArray(this.config.scope) ? this.config.scope.join(" ") : this.config.scope,
|
||||
scope: Array.isArray(this.config.scope) ? this.config.scope.join(" ") : this.config.scope!,
|
||||
redirect_uri: this.getCallbackUri(auth, host),
|
||||
...(this.config.authorizationParams ?? {}),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user