fix(core): Use correct scopes-separator when generating authorization urls (#6502)
This commit is contained in:
committed by
GitHub
parent
6ab350209d
commit
5bf83f8bf6
@@ -1,7 +1,7 @@
|
||||
import type { ClientOAuth2, ClientOAuth2Options } from './ClientOAuth2';
|
||||
import type { ClientOAuth2Token, ClientOAuth2TokenData } from './ClientOAuth2Token';
|
||||
import { DEFAULT_HEADERS } from './constants';
|
||||
import { auth, expects, getRequestOptions, sanitizeScope } from './utils';
|
||||
import { auth, expects, getRequestOptions } from './utils';
|
||||
|
||||
interface CredentialsFlowBody {
|
||||
grant_type: 'client_credentials';
|
||||
@@ -29,7 +29,7 @@ export class CredentialsFlow {
|
||||
};
|
||||
|
||||
if (options.scopes !== undefined) {
|
||||
body.scope = sanitizeScope(options.scopes);
|
||||
body.scope = options.scopes.join(options.scopesSeparator ?? ' ');
|
||||
}
|
||||
|
||||
const requestOptions = getRequestOptions(
|
||||
|
||||
Reference in New Issue
Block a user