flutter_web_auth_2 icon indicating copy to clipboard operation
flutter_web_auth_2 copied to clipboard

App does not authenticate the user after redirection

Open jrelova opened this issue 10 months ago • 1 comments

Description This only happens on the Android application. After successfully logging in the browser the browser is dismissed and the user is redirected back to the app. Unfortunately the user is not authenticated and is not automatically logged in. I've also added some breakpoints on my code and result from FlutterWebAuth.authenticate() is not being used/triggered after the redirection.

Important note:

  • User can successfully login in via the FlutterWebAuth.authenticate() on the second instance of logging in, but at the first try where the app is fresh installed and chrome data has been cleared the user is not being authenticated.
  • Authentication was done by using FlutterWebAuth.authenticate() and i've also added the necessary code snippet on the AndroidManifest.xml

Exception or Error There is not error, just authentication is not working properly on initial log in.

Expected Behaviour User should be redirected to the app and automatically logged in.

Screenshots No response

Additional context No response

Device Galaxy S22

OS Android 13

Browser Chrome

Flutter version 3.13.8

flutter_web_auth_2 version 3.0.0

Checklist I have read and followed the entire troubleshooting guide and it has not provided the solution I need. I have provided all the information I can.

jrelova avatar Apr 17 '24 00:04 jrelova

Sadly I don't really understand the underlying issue. This package is used for retrieving a redirection URL, which should contain the identification token (or something like that). So, the entire authentication process is done in a custom tab, which just shows a webpage that has nothing to do with flutter_web_auth_2. So, if the authentication itself is not working, it is most definetly not flutter_web_auth_2's fault. Is your issue maybe that flutter_web_auth_2 does not catch this URL correctly?

ThexXTURBOXx avatar Apr 17 '24 20:04 ThexXTURBOXx

Stale issue; closing due to inactivity

ThexXTURBOXx avatar May 04 '24 18:05 ThexXTURBOXx