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

"Not found" upon logging in on Android 33 #321

Closed
6 tasks done
MilesAdamson opened this issue Oct 19, 2023 · 11 comments
Closed
6 tasks done

"Not found" upon logging in on Android 33 #321

MilesAdamson opened this issue Oct 19, 2023 · 11 comments
Labels

Comments

@MilesAdamson
Copy link

MilesAdamson commented Oct 19, 2023

Checklist

Description

Upon logging in with webAuthentication and login, after entering my username and password, I see a screen which just says "not found". The future does not complete from login and I do not get the login tokens. Pressing X from this screen counts as cancelling the login.

image

Reproduction

  1. Clone sample project and follow readme https://github.com/auth0-samples/auth0-flutter-samples/blob/main/sample/README.md
  2. Update auth0 secrets and change android applicationId
  3. Build and run app
  4. Login successfully

Additional context

The same thing happens with my actual app, but I can reproduce it in the sample project as well.

auth0_flutter version

1.2.0

Flutter version

3.10.6

Platform

Android

Platform version(s)

Android 33

@MilesAdamson
Copy link
Author

MilesAdamson commented Oct 19, 2023

I tried it also on Android 29 and the same thing is happening. Maybe it has something do do with my existing auth0 setup?

Previously, login was happening with a POST to /oauth/token and everything else was handled on our end. Now, I am trying to change this to allowing single sign on

@MilesAdamson
Copy link
Author

This appears to be an Android issue, it's working fine on my iOS device with the same code. Both the same project and my own are working fine and I get tokens back

@jdmanifest
Copy link

I'm having the same problem, will report back if I find a solution.

@jdmanifest
Copy link

So if you're defining https as a custom scheme, that seems to have been my problem.

@Widcket
Copy link
Contributor

Widcket commented Oct 20, 2023

Closing, as the issue seems to have been resolved. Please feel free to ping if you'd prefer to reopen.

@Widcket Widcket closed this as completed Oct 20, 2023
@MilesAdamson
Copy link
Author

MilesAdamson commented Oct 20, 2023

@Widcket could you direct me to any solutions/docs on how people fixed this in the past please? The sample project has this issue out of the box for me so I'm not sure how this is resolved.

For scheme I have just what the example project has:

manifestPlaceholders['auth0Scheme'] = "@string/com_auth0_scheme"

and

<string name="com_auth0_scheme">https</string>

Custom scheme was not set in my .env, I tested deleting the scheme from webAuthentication just to check and have the same "not found" behavior

@Widcket
Copy link
Contributor

Widcket commented Oct 20, 2023

@poovamraj could you please take this one?

@jdmanifest
Copy link

Please re-open this issue, as it seems to be common and unresolved. I tried changing the scheme to "demo" and adding another callback url in Auth0, but that didn't work. However it did behave differently - I just get a blank webpage and cannot log in.

https://community.auth0.com/t/i-am-using-default-schema-for-flutter-webauthentication-login-but-after-login-i-am-not-coming-back-in-app/118873

https://stackoverflow.com/questions/76031825/auth0-integration-in-flutter-android-not-returning-to-app-after-login-logout

https://community.auth0.com/t/flutter-webauth-redirects-to-not-found-page/89557

https://community.auth0.com/t/flutter-gives-not-found-instead-of-redirecting-to-app/98929

#291

Can you post you're callback links from ur auth0 application off the dashboard? Sounds like you may have them in their wrong.

@MilesAdamson
Copy link
Author

I am confident they are set properly, or else I would see the callback mismatch screen upon trying to log in. I saw this screen at one point during setup when I just tried to run the plugin without adding the URL's yet.

If I use https as my scheme, this happens:

  • I see the correct login page
  • I enter credentials
  • Upon logging in, I see the "not found" screen screenshotted in the issue
  • The future never resolves in my app and I can't get the tokens/login result
  • If I go to logout, the logout seems to work but I also just see the "not found" screen and am not taken back into my app

If I use "demo" as my scheme, this happens:

  • I see the correct login page
  • I enter credentials
  • Upon pressing "continue", nothing happens at all on the webpage
  • The future never resolves in my app and I can't get the tokens/login result
  • If I then go to the logout page, it's just a blank page and also never redirects to my app

image

@ajyong
Copy link
Contributor

ajyong commented Oct 23, 2023

I'm not sure the root cause for custom schemes but for https, the pub.dev documentation is lacking an important step: supporting Android App Links.

This guidance is provided here and here and is missing from the pub.dev equivalent. Although it's covered in EXAMPLES.md, I thought it be better if it was also surfaced in the main README. I've submitted #324 to do that.

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

4 participants