Client - add PKCE support when authorizing an app
This commit is contained in:
parent
922ff63d99
commit
b96a682eb8
@ -73,7 +73,15 @@
|
|||||||
redirect_uri: `${route.query.redirect_uri}`,
|
redirect_uri: `${route.query.redirect_uri}`,
|
||||||
response_type: `${route.query.response_type}`,
|
response_type: `${route.query.response_type}`,
|
||||||
scope: `${route.query.scope}`,
|
scope: `${route.query.scope}`,
|
||||||
state: `${route.query.state}`,
|
state: `${route.query.state ? route.query.state : ''}`,
|
||||||
|
code_challenge: `${
|
||||||
|
route.query.code_challenge ? route.query.code_challenge : ''
|
||||||
|
}`,
|
||||||
|
code_challenge_method: `${
|
||||||
|
route.query.code_challenge_method
|
||||||
|
? route.query.code_challenge_method
|
||||||
|
: ''
|
||||||
|
}`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -43,6 +43,12 @@ export const actions: ActionTree<IOAuth2State, IRootState> & IOAuth2Actions = {
|
|||||||
if (payload.state) {
|
if (payload.state) {
|
||||||
form.set('state', payload.state)
|
form.set('state', payload.state)
|
||||||
}
|
}
|
||||||
|
if (payload.code_challenge) {
|
||||||
|
form.set('code_challenge', payload.code_challenge)
|
||||||
|
}
|
||||||
|
if (payload.code_challenge_method) {
|
||||||
|
form.set('code_challenge_method', payload.code_challenge_method)
|
||||||
|
}
|
||||||
|
|
||||||
authApi
|
authApi
|
||||||
.post('oauth/authorize', form, {
|
.post('oauth/authorize', form, {
|
||||||
|
@ -27,5 +27,7 @@ export interface IOAuth2ClientAuthorizePayload {
|
|||||||
redirect_uri: string
|
redirect_uri: string
|
||||||
response_type: string
|
response_type: string
|
||||||
scope: string
|
scope: string
|
||||||
state?: string
|
state: string
|
||||||
|
code_challenge: string
|
||||||
|
code_challenge_method: string
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user