1
0
Fork 0
mirror of synced 2024-09-17 10:00:07 +12:00

1.6 Fixes

This commit is contained in:
Bradley Schofield 2024-07-10 20:04:01 +09:00
parent 2722ec76b6
commit 37de2ba196
2 changed files with 9 additions and 5 deletions

View file

@ -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());

View file

@ -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(