chore: 🤖 remove cookies flag from oidc start auth

This commit is contained in:
Randall Morey committed 2021-03-15 17:08:25 -04:00
1 parent 896671ceb1
commit 9e57f838d5
2 files changed
+4 -8

No files matched your search

+2 -5
View File
@@ -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
@@ -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);
}