File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,14 @@ export class UnauthorizedError extends Error {
84
84
*/
85
85
export async function auth (
86
86
provider : OAuthClientProvider ,
87
- { serverUrl, authorizationCode } : { serverUrl : string | URL , authorizationCode ?: string } ) : Promise < AuthResult > {
87
+ { serverUrl,
88
+ authorizationCode,
89
+ scope,
90
+ } : {
91
+ serverUrl : string | URL ;
92
+ authorizationCode ?: string ;
93
+ scope ?: string ;
94
+ } ) : Promise < AuthResult > {
88
95
const metadata = await discoverOAuthMetadata ( serverUrl ) ;
89
96
90
97
// Handle client registration if needed
@@ -146,7 +153,7 @@ export async function auth(
146
153
metadata,
147
154
clientInformation,
148
155
redirectUrl : provider . redirectUrl ,
149
- scope : provider . clientMetadata . scope
156
+ scope : scope || provider . clientMetadata . scope ,
150
157
} ) ;
151
158
152
159
await provider . saveCodeVerifier ( codeVerifier ) ;
You can’t perform that action at this time.
0 commit comments