Skip to content

Commit

Permalink
FIO-7804 Added PKCE method for OIDC (#5517)
Browse files Browse the repository at this point in the history
  • Loading branch information
HannaKurban authored Feb 21, 2024
1 parent b286761 commit 66be059
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,16 @@ export default class ButtonComponent extends Field {
response_type: 'code',
client_id: settings.clientId,
redirect_uri: (settings.redirectURI && this.interpolate(settings.redirectURI)) || window.location.origin || `${window.location.protocol}//${window.location.host}`,
state: settings.state,
scope: settings.scope
};
if (settings.state) {
params.state = settings.state;
}
else if (settings.code_challenge) {
params.code_challenge = settings.code_challenge;
params.code_challenge_method = 'S256';
}

/*eslint-enable camelcase */

// Needs for the correct redirection URI for the OpenID
Expand Down

0 comments on commit 66be059

Please sign in to comment.