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

What is expected behavior of token.getWithoutPrompt in web browser on mobile device? #1458

Open
yermasog opened this issue Sep 21, 2023 · 2 comments
Labels

Comments

@yermasog
Copy link

Describe the bug

Not as much a bug as a question or clarification.

I have a web app that is working perfectly in desktop; no issues. When I try to log in on a mobile device using a web browser, token.getWithoutPrompt fails. I've tested this on iOS16 on chrome and android 13 on chrome and it fails.

It also fails on desktop browser in dev tools when I switch to mobile view. I have tried this in edge and chrome. I am aware that safari is already blocking third party cookies so I didn't bother with it.

I understand that token.getWithoutPrompt is a web browser only feature, but I would still expect it to work in this case?

This app is using an old version. I looked through the change/release logs to see if there were any changes around this issue and didn't find any

Reproduction Steps?

Log into a web app on mobile

SDK Versions

edge Version 117.0.2045.35
chrome Version 116.0.5845.187
@okta/okta-auth-js 5.6
@okta/okta-signin-widget 5.12

Additional Information?

No response

@yermasog yermasog added the bug label Sep 21, 2023
@jaredperreault-okta
Copy link
Contributor

jaredperreault-okta commented Sep 21, 2023

I have a web app that is working perfectly in desktop; no issues. When I try to log in on a mobile device using a web browser, token.getWithoutPrompt fails. I've tested this on iOS16 on chrome and android 13 on chrome and it fails.

getWithoutPrompt will only succeed if a session already exists between the browser and Okta. Is that true when you test on mobile?

It also fails on desktop browser in dev tools when I switch to mobile view. I have tried this in edge and chrome. I am aware that safari is already blocking third party cookies so I didn't bother with it.

Mobile view, as in the mobile viewport toggle? Are there any errors that are logged to the js console?

@yermasog
Copy link
Author

yermasog commented Oct 6, 2023

Screenshot 2023-10-06 at 6 58 27 PM

This is an android phone running on chrome connected to the debugger. From the console you can see that the okta session was established successfully. getWithoutPrompt is called to exchange the token.

An interesting behavior: on mobile, if a user switches to desktop mode, they are able to successfully login, and then can switch back to the mobile site without issue.

I did enable third party cookies, but could it be possible that chrome is blocking third party cookies on mobile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants