From 3c32f9009a591b6d85fbf725c4cfef88525550e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Salgado?= Date: Wed, 24 Nov 2021 22:20:21 +0000 Subject: [PATCH] fix: expected rp names --- .../graphql/modules/authentication/FIDO2FAStrategy.js | 4 ++-- .../modules/authentication/FIDOPasswordlessStrategy.js | 4 ++-- .../modules/authentication/FIDOUsernamelessStrategy.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/new-admin/graphql/modules/authentication/FIDO2FAStrategy.js b/lib/new-admin/graphql/modules/authentication/FIDO2FAStrategy.js index 9954ba5d..82cd4ee1 100644 --- a/lib/new-admin/graphql/modules/authentication/FIDO2FAStrategy.js +++ b/lib/new-admin/graphql/modules/authentication/FIDO2FAStrategy.js @@ -13,8 +13,8 @@ const devMode = require('minimist')(process.argv.slice(2)).dev const REMEMBER_ME_AGE = 90 * T.day -const rpID = devMode ? `localhost` : domain -const expectedOrigin = `https://${rpID}:3001` +const rpID = devMode ? `localhost:3001` : domain +const expectedOrigin = `https://${rpID}` const generateAttestationOptions = (session, options) => { return users.getUserById(options.userId).then(user => { diff --git a/lib/new-admin/graphql/modules/authentication/FIDOPasswordlessStrategy.js b/lib/new-admin/graphql/modules/authentication/FIDOPasswordlessStrategy.js index 0e834e13..8c39e624 100644 --- a/lib/new-admin/graphql/modules/authentication/FIDOPasswordlessStrategy.js +++ b/lib/new-admin/graphql/modules/authentication/FIDOPasswordlessStrategy.js @@ -12,8 +12,8 @@ const devMode = require('minimist')(process.argv.slice(2)).dev const REMEMBER_ME_AGE = 90 * T.day -const rpID = devMode ? `localhost` : domain -const expectedOrigin = `https://${rpID}:3001` +const rpID = devMode ? `localhost:3001` : domain +const expectedOrigin = `https://${rpID}` const generateAttestationOptions = (session, options) => { return users.getUserById(options.userId).then(user => { diff --git a/lib/new-admin/graphql/modules/authentication/FIDOUsernamelessStrategy.js b/lib/new-admin/graphql/modules/authentication/FIDOUsernamelessStrategy.js index 8c481468..2a1ee59a 100644 --- a/lib/new-admin/graphql/modules/authentication/FIDOUsernamelessStrategy.js +++ b/lib/new-admin/graphql/modules/authentication/FIDOUsernamelessStrategy.js @@ -12,8 +12,8 @@ const devMode = require('minimist')(process.argv.slice(2)).dev const REMEMBER_ME_AGE = 90 * T.day -const rpID = devMode ? `localhost` : domain -const expectedOrigin = `https://${rpID}:3001` +const rpID = devMode ? `localhost:3001` : domain +const expectedOrigin = `https://${rpID}` const generateAttestationOptions = (session, options) => { return credentials.getHardwareCredentials().then(devices => {