From 9e57f838d59388a1bab513e7e1ed2c48675d9496 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 15 Mar 2021 17:08:25 -0400 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20remove=20cookies=20flag?= =?UTF-8?q?=20from=20oidc=20start=20auth?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/auth/addon/authenticators/oidc.js | 7 ++----- ui/admin/app/routes/scopes/scope/authenticate/method.js | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/addons/auth/addon/authenticators/oidc.js b/addons/auth/addon/authenticators/oidc.js index c40e58be0..ad3b1c760 100644 --- a/addons/auth/addon/authenticators/oidc.js +++ b/addons/auth/addon/authenticators/oidc.js @@ -65,12 +65,9 @@ export default class OIDCAuthenticator extends BaseAuthenticator { * @param {object} options * @return {object} */ - async startAuthentication(requestCookies = true, options) { + async startAuthentication(options) { const url = this.buildStartAuthEndpointURL(options); - const body = JSON.stringify({ - token_type: requestCookies ? 'cookie' : null - }); - const response = await fetch(url, { method: 'post', body }); + const response = await fetch(url, { method: 'post' }); const json = await response.json(); if (response.status < 400) { // Store meta about the pending OIDC flow diff --git a/ui/admin/app/routes/scopes/scope/authenticate/method.js b/ui/admin/app/routes/scopes/scope/authenticate/method.js index 787c42644..075c4ae3a 100644 --- a/ui/admin/app/routes/scopes/scope/authenticate/method.js +++ b/ui/admin/app/routes/scopes/scope/authenticate/method.js @@ -51,7 +51,6 @@ export default class ScopesScopeAuthenticateMethodRoute extends Route { case 'oidc': await this.startOIDCAuthentication( authenticatorName, - requestCookies, { scope, authMethod } ); this.transitionTo('scopes.scope.authenticate.method.oidc'); @@ -62,11 +61,11 @@ export default class ScopesScopeAuthenticateMethodRoute extends Route { /** * */ - async startOIDCAuthentication(authenticatorName, requestCookies, options) { + async startOIDCAuthentication(authenticatorName, options) { const oidc = getOwner(this).lookup(authenticatorName); // TODO: delegate this call from the session service so that we don't have // to look up the authenticator directly - const json = await oidc.startAuthentication(requestCookies, options); + const json = await oidc.startAuthentication(options); await this.openExternalOIDCFlow(json.authorization_request_url); }