Skip to content

Commit

Permalink
wait for 2 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
peintnermax committed Dec 9, 2024
1 parent a749c76 commit 41f7c5a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/login/src/components/login-otp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41f7c5a

Please sign in to comment.