mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-02-03 17:29:54 +05:30
Resolves #41. Add support for code_challenge
param
This commit is contained in:
parent
fdef4a33bf
commit
beb3927f78
@ -44,6 +44,8 @@ export interface OauthAuthCodeFlowParams {
|
||||
responseType: string;
|
||||
state: string;
|
||||
scope: string;
|
||||
code_challenge?: string;
|
||||
code_challenge_method?: string;
|
||||
}
|
||||
|
||||
export interface OauthDeviceCodeFlowParams {
|
||||
|
@ -30,6 +30,8 @@ describe('OAuthState', () => {
|
||||
response_type: 'response_type',
|
||||
description: 'description',
|
||||
scope: 'scope1 scope2',
|
||||
code_challenge: 'code_challenge',
|
||||
code_challenge_method: 'S256',
|
||||
prompt: 'none',
|
||||
login_hint: '1',
|
||||
state: 'state',
|
||||
@ -50,6 +52,8 @@ describe('OAuthState', () => {
|
||||
responseType: query.response_type,
|
||||
scope: query.scope,
|
||||
state: query.state,
|
||||
code_challenge: query.code_challenge,
|
||||
code_challenge_method: query.code_challenge_method,
|
||||
},
|
||||
description: query.description,
|
||||
prompt: query.prompt,
|
||||
|
@ -14,6 +14,8 @@ export default class InitOAuthAuthCodeFlowState extends AbstractState {
|
||||
responseType: query.get('response_type')!,
|
||||
scope: (query.get('scope') || '').replace(/,/g, ' '),
|
||||
state: query.get('state')!,
|
||||
code_challenge: query.get('code_challenge') || undefined,
|
||||
code_challenge_method: query.get('code_challenge_method') || undefined,
|
||||
},
|
||||
description: query.get('description')!,
|
||||
prompt: query.get('prompt')!,
|
||||
|
Loading…
x
Reference in New Issue
Block a user