-
Notifications
You must be signed in to change notification settings - Fork 44
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
[wasm] loginWithPopup is not working #535
Comments
Hi @shovelmn12 , Thanks for bringing this to our notice. We will take a look and address this issue |
@pmathew92 I checked the popup's console and I am getting the following:
I am not setting any |
@pmathew92 ok after further investigation I figured out the pop window thats opened is marked as
I added the following lines to
therefore I am always getting Edit: Aha! https://developer.mozilla.org/en-US/docs/Web/API/Window/open#same-origin_policy https://stackoverflow.com/questions/50143828/window-closed-is-always-true
Edit 2: Both including |
Hi @shovelmn12 , for the |
@pmathew92 thats the thing, I am NOT passing any org... check the reference js issue (auth0/auth0-spa-js#1349) |
@pmathew92 the funny thing is that this works when not runnin flutter in wasm ... |
Checklist
Description
When passing
String
params to the SDK it fails to login asString
is not aJSAny
.auth0-flutter/auth0_flutter/lib/src/web/js_interop_utils.dart
Line 30 in 1fccddf
This line should be changed to
value.toJS
Also because of your defenition of params the funcation
addCustomParams<T extends JSObject>(final T obj, final Map<String, dynamic> params)
should usefinal Map<String, String> params
and notfinal Map<String, dynamic> params
After fixing this error
loginWithPopup
still did not work, I am gettingerror cancelled: Popup closed
I tried removing
parameters
and I am still getting the same errorerror cancelled: Popup closed
Reproduction
Pass
String
params tologinWithPopup
and you will get an errorType 'String' is not a subtype of type 'JSValue' in type cast
if this is fixed then the next error you will get is
error cancelled: Popup closed
Additional context
No response
auth0_flutter version
1.9.0
Flutter version
3.29.1
Platform
Web
Platform version(s)
wasm
The text was updated successfully, but these errors were encountered: