Skip to content

Commit

Permalink
Temporarily added supplying state parameter to the client. (#1153)
Browse files Browse the repository at this point in the history
  • Loading branch information
azaslonov authored Feb 18, 2021
1 parent 9c06ec9 commit cad30ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/services/oauthService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,17 @@ export class OAuthService {
public async authenticateCode(backendUrl: string, authorizationServer: AuthorizationServer): Promise<string> {
const redirectUri = `${backendUrl}/signin-oauth/code/callback/${authorizationServer.name}`;

const query = {
state: Utils.guid()
};

const oauthClient = new ClientOAuth2({
clientId: authorizationServer.clientId,
accessTokenUri: authorizationServer.tokenEndpoint,
authorizationUri: authorizationServer.authorizationEndpoint,
redirectUri: redirectUri,
scopes: authorizationServer.scopes
scopes: authorizationServer.scopes,
query: query
});

return new Promise<string>((resolve, reject) => {
Expand Down

0 comments on commit cad30ec

Please sign in to comment.