Skip to content

Commit

Permalink
use type authorization_code for private client
Browse files Browse the repository at this point in the history
  • Loading branch information
yunakim714 committed Sep 17, 2024
1 parent c510758 commit 863f59b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/static/helpers/IDPLoginHelper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('Social login user flow', () => {
)}`,
},
body: {
grant_type: 'authorization_code_pkce',
grant_type: 'authorization_code',
redirect_uri: 'redirect_uri',
client_id: 'client_id',
channel_id: 'site_id',
Expand Down
4 changes: 3 additions & 1 deletion src/static/helpers/IDPLoginHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ async function loginIDPUser(
channel_id: slasClient.clientConfig.parameters.siteId,
code: authResponse.code,
code_verifier: codeVerifier,
grant_type: 'authorization_code_pkce',
grant_type: privateClient
? 'authorization_code'
: 'authorization_code_pkce',
redirect_uri: parameters.redirectURI,
usid: authResponse.usid,
...(parameters.dnt !== undefined && {dnt: parameters.dnt.toString()}),
Expand Down

0 comments on commit 863f59b

Please sign in to comment.