Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #629 from nextcloud/fix/appid-mismatch-warning
Browse files Browse the repository at this point in the history
Warn about appId mismatch
  • Loading branch information
ChristophWurst authored Jan 7, 2020
2 parents 4934f6c + 97e10d8 commit 27b330b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/AddDeviceDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@
},

register ({req, sigs}) {
logger.debug('starting registration')
logger.debug('starting registration', {appId: req.appId})

if (location.protocol === 'https:' && req.appId.startsWith('http:')) {
logger.warn('Server generated a U2F App ID that starts with HTTP but you\'re connected via HTTPS. Set your overwrites https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/reverse_proxy_configuration.html#overwrite-parameters')
}

return u2f.register([req], sigs)
.then(data => {
Expand Down Expand Up @@ -151,7 +155,7 @@
// 2 - BAD_REQUEST
// 3 - CONFIGURATION_UNSUPPORTED
Promise.reject(new Error(t('twofactor_u2f', 'U2F device registration failed (error code {errorCode})', {
errorCode: data.errorCode
errorCode: data.errorCode || 'unknown'
})));
}
},
Expand Down

0 comments on commit 27b330b

Please sign in to comment.