Closed volkanustekidag closed 6 months ago
You need to follow exactly the steps in https://github.com/ThexXTURBOXx/flutter_web_auth_2?tab=readme-ov-file#web
If you are building a Flutter Web application, you should not redirect to some URL scheme, but your redirect URL needs to point to the auth.html
file that is provided in the setup guide.
You need to follow exactly the steps in https://github.com/ThexXTURBOXx/flutter_web_auth_2?tab=readme-ov-file#web If you are building a Flutter Web application, you should not redirect to some URL scheme, but your redirect URL needs to point to the
auth.html
file that is provided in the setup guide. @ThexXTURBOXx
Why is http://localhost:5200/auth.html not a valid callbackUrlScheme ?
It get's blocked by the _assertCallbackScheme function.
The regex: RegExp(r'^[a-z][a-z\d+.-]*$') does not allow this: http://localhost:5200/auth.html.
Can you give an example of a valid callbackUrlScheme on WEB ?
If u use Microsoft you can't add a callbackUrlScheme in the settings without providing the prefix: http://...
@stan-at-work Because you are supposed to provide a callback URL scheme, not a full URL.
Furthermore, as seen in this line, on Web the callback URL scheme gets ignored anyway, so just provide anything (in your case, just supply http
).
In general, this is a case of RTFM.
Your comment does also seem to be not related to this issue - so for the future, open an own issue for that. I will also close this issue here as stale.
@stan-at-work Because you are supposed to provide a callback URL scheme, not a full URL. Furthermore, as seen in this line, on Web the callback URL scheme gets ignored anyway, so just provide anything (in your case, just supply
http
). In general, this is a case of RTFM.Your comment does also seem to be not related to this issue - so for the future, open an own issue for that. I will also close this issue here as stale.
Thanks, that works. You should really consider adding this to the documentation:
Web: callbackscheme = 'http'
This would help ALLOT.
Thanks for the quick response :-)
Description
I'm trying to provide login using package in a web application. I open the link I created and log in, but the tab is closed and I cannot receive the code I expect. I couldn't understand what I was missing.
Minimal Reproduction
Steps to reproduce the behaviour:
Use the following code:
<!DOCTYPE html>
Authentication is complete. If this does not happen automatically, please close the window.