mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-26 16:52:06 +05:30
Fix the case when passed more than 2 scopes, delimited by comma
This commit is contained in:
parent
7af08f3ed7
commit
0609815ac6
@ -10,7 +10,7 @@ export default class OAuthState extends AbstractState {
|
||||
redirectUrl: query.get('redirect_uri'),
|
||||
responseType: query.get('response_type'),
|
||||
description: query.get('description'),
|
||||
scope: (query.get('scope') || '').replace(',', ' '),
|
||||
scope: (query.get('scope') || '').replace(/,/g, ' '),
|
||||
prompt: query.get('prompt'),
|
||||
loginHint: query.get('login_hint'),
|
||||
state: query.get('state')
|
||||
|
@ -123,7 +123,7 @@ describe('OAuthState', () => {
|
||||
client_id: 'client_id',
|
||||
redirect_uri: 'redirect_uri',
|
||||
response_type: 'response_type',
|
||||
scope: 'scope1,scope2',
|
||||
scope: 'scope1,scope2,scope3',
|
||||
state: 'state',
|
||||
};
|
||||
|
||||
@ -138,7 +138,7 @@ describe('OAuthState', () => {
|
||||
clientId: query.client_id,
|
||||
redirectUrl: query.redirect_uri,
|
||||
responseType: query.response_type,
|
||||
scope: 'scope1 scope2',
|
||||
scope: 'scope1 scope2 scope3',
|
||||
state: query.state,
|
||||
})
|
||||
).returns({then() {}});
|
||||
|
Loading…
Reference in New Issue
Block a user