1.6 Fixes
This commit is contained in:
parent
2722ec76b6
commit
37de2ba196
2 changed files with 9 additions and 5 deletions
|
@ -4545,7 +4545,9 @@ App::put('/v1/account/mfa/challenge/webauthn')
|
|||
]));
|
||||
|
||||
// Update Session
|
||||
$dbForProject->deleteDocument('challenges', $challengeId);
|
||||
Authorization::skip(function () use ($dbForProject, $challengeId) {
|
||||
$dbForProject->deleteDocument('challenges', $challengeId);
|
||||
});
|
||||
$dbForProject->purgeCachedDocument('users', $user->getId());
|
||||
|
||||
$factors = $session->getAttribute('factors', []);
|
||||
|
@ -4558,9 +4560,6 @@ App::put('/v1/account/mfa/challenge/webauthn')
|
|||
|
||||
$dbForProject->updateDocument('sessions', $session->getId(), $session);
|
||||
|
||||
// Delete challenge
|
||||
$dbForProject->deleteDocument('challenges', $challengeId);
|
||||
|
||||
$queueForEvents
|
||||
->setParam('userId', $user->getId())
|
||||
->setParam('sessionId', $session->getId());
|
||||
|
|
|
@ -110,7 +110,12 @@ class WebAuthn extends Type
|
|||
// Console
|
||||
if ($project->getId() === 'console') {
|
||||
$platformName = 'Appwrite';
|
||||
$platformId = App::getEnv('_APP_DOMAIN', '');
|
||||
|
||||
if (App::isDevelopment()) {
|
||||
$platformId = 'localhost';
|
||||
} else {
|
||||
$platformId = App::getEnv('_APP_DOMAIN', '');
|
||||
}
|
||||
}
|
||||
|
||||
return new PublicKeyCredentialRpEntity(
|
||||
|
|
Loading…
Reference in a new issue