fix: FIDO registration on localhost environments
This commit is contained in:
parent
97123fb5c3
commit
a9e74086bf
3 changed files with 6 additions and 6 deletions
|
|
@ -13,8 +13,8 @@ const devMode = require('minimist')(process.argv.slice(2)).dev
|
||||||
|
|
||||||
const REMEMBER_ME_AGE = 90 * T.day
|
const REMEMBER_ME_AGE = 90 * T.day
|
||||||
|
|
||||||
const rpID = devMode ? `localhost:3001` : domain
|
const rpID = domain
|
||||||
const expectedOrigin = `https://${rpID}`
|
const expectedOrigin = `https://${rpID}${devMode ? `:3001` : ``}`
|
||||||
|
|
||||||
const generateAttestationOptions = (session, options) => {
|
const generateAttestationOptions = (session, options) => {
|
||||||
return users.getUserById(options.userId).then(user => {
|
return users.getUserById(options.userId).then(user => {
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ const devMode = require('minimist')(process.argv.slice(2)).dev
|
||||||
|
|
||||||
const REMEMBER_ME_AGE = 90 * T.day
|
const REMEMBER_ME_AGE = 90 * T.day
|
||||||
|
|
||||||
const rpID = devMode ? `localhost:3001` : domain
|
const rpID = domain
|
||||||
const expectedOrigin = `https://${rpID}`
|
const expectedOrigin = `https://${rpID}${devMode ? `:3001` : ``}`
|
||||||
|
|
||||||
const generateAttestationOptions = (session, options) => {
|
const generateAttestationOptions = (session, options) => {
|
||||||
return users.getUserById(options.userId).then(user => {
|
return users.getUserById(options.userId).then(user => {
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ const devMode = require('minimist')(process.argv.slice(2)).dev
|
||||||
|
|
||||||
const REMEMBER_ME_AGE = 90 * T.day
|
const REMEMBER_ME_AGE = 90 * T.day
|
||||||
|
|
||||||
const rpID = devMode ? `localhost:3001` : domain
|
const rpID = domain
|
||||||
const expectedOrigin = `https://${rpID}`
|
const expectedOrigin = `https://${rpID}${devMode ? `:3001` : ``}`
|
||||||
|
|
||||||
const generateAttestationOptions = (session, options) => {
|
const generateAttestationOptions = (session, options) => {
|
||||||
return credentials.getHardwareCredentials().then(devices => {
|
return credentials.getHardwareCredentials().then(devices => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue