Skip to content

Commit

Permalink
Leentfeex
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Nov 16, 2022
1 parent 4f5d18f commit 696e656
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions ui/app/controllers/settings/tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,18 @@ export default class Tokens extends Controller {
}

async validateSSO() {
const res = await this.token.authorizedRequest('/v1/acl/oidc/complete-auth', {
method: 'POST',
body: JSON.stringify({
AuthMethod: window.localStorage.getItem('nomadOIDCAuthMethod'),
ClientNonce: window.localStorage.getItem('nomadOIDCNonce'),
Code: this.code,
State: this.state,
}),
});
const res = await this.token.authorizedRequest(
'/v1/acl/oidc/complete-auth',
{
method: 'POST',
body: JSON.stringify({
AuthMethod: window.localStorage.getItem('nomadOIDCAuthMethod'),
ClientNonce: window.localStorage.getItem('nomadOIDCNonce'),
Code: this.code,
State: this.state,
}),
}
);

if (res.ok) {
const data = await res.json();
Expand All @@ -143,7 +146,7 @@ export default class Tokens extends Controller {
this.state = null;
} else {
this.flashMessages.add({
title: "Error completing authentication",
title: 'Error completing authentication',
message: res.statusText,
type: 'error',
destroyOnClick: false,
Expand Down

0 comments on commit 696e656

Please sign in to comment.