Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect not happening if app is put into background #286

Open
jiaqi-transcarent opened this issue Mar 14, 2024 · 2 comments
Open

Redirect not happening if app is put into background #286

jiaqi-transcarent opened this issue Mar 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jiaqi-transcarent
Copy link

jiaqi-transcarent commented Mar 14, 2024

Describe the bug?

We just found out that during the MFA flow, if you tap "send email", then put the app to the background and tap on verify email in the email you just get, then come back to the app, the sign-in widget gets stuck in the "signing in" page and does not redirect.

The app redirects fine if you keep the app in the foreground and tap on the email elsewhere (say on your desktop).

I think this might be related to Custom Tab's lifecycle and here are some other issues that might be related:

Not Redirecting Redirecting
failure.mp4
success.mp4

What is expected to happen?

User is redirected after verifying email and coming back to the app.

What is the actual behavior?

User is stuck on "signing in".

Reproduction Steps?

Okta sign-in widget for authentication and enable MFA flow.

Additional Information?

No response

SDK Version and Artifact(s) used.

okta-mobile-kotlin: 1.7.21
Android 14

Build Information

No response

@jiaqi-transcarent jiaqi-transcarent added the bug Something isn't working label Mar 14, 2024
@rajdeepnanua-okta
Copy link
Contributor

rajdeepnanua-okta commented Mar 14, 2024

Hi @jiaqi-transcarent, we are aware of this bug. I filed a ticket with Chromium team here: https://issues.chromium.org/issues/328662559
Google team suggested us steps to collect more logs. From further Chrome navigation logs analysis, I realized that this bug (on our side) is happening because of the following:

  1. Okta Sign-in widget (the login page popped up for Browser redirect) starts polling the backend for email verification
  2. App gets backgrounded
  3. Verification happens while app is in the background
  4. Sign-in widget receives a valid redirect while it's polling in the background
  5. Sign-in widget tries to redirect while the app is backgrounded. Because the app is in background, the redirect is dropped. This is the root cause of the issue.

This is unfortunately not something that can be fixed in this SDK. It is an issue with the Sign-in widget, and I am working on redirecting this issue to the correct teams.

For now, I will keep this issue open and will provide updates on when the issue is fixed on SIW side.

@jiaqi-transcarent
Copy link
Author

Hi @rajdeepnanua-okta, understood and thanks for your quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants