wait for 2 seconds

This commit is contained in:
Max Peintner
2024-12-09 15:12:51 +01:00
parent a749c76f4f
commit 41f7c5a4b3

View File

@@ -182,6 +182,9 @@ export function LoginOTP({
function setCodeAndContinue(values: Inputs, organization?: string) {
return submitCode(values, organization).then(async (response) => {
// Wait for 2 seconds to avoid eventual consistency issues with an OTP code being verified in the /login endpoint
await new Promise((resolve) => setTimeout(resolve, 2000));
if (response) {
const url =
authRequestId && response.sessionId