-
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
Future OpenIdConnect.authorizeInteractive directly returns null for response when param 'useWebPopup' is false in 2024 #54
Comments
Hi @s681562 , I suggest you give package:oidc a try since it also works with WASM, while this package is using old dart js interop. the reason you get an immediate null with |
Hi @ahmednfwela, I am using right now package:oidc. Thank you for your effort. What I found out: CORS problem. ClientException: XMLHttpRequest error., uri=https://.../realms/.../protocol/openid-connect/token For my test client on localhost I don't have cors issue. But in production I still have an keycloak issue with cors. Therefore Any ideas to solve this cors problem with keycloak 25.0.1.? Btw...
Any ideas? |
The cors issue is because you haven't configured
the checkout this SO issue https://stackoverflow.com/questions/46220566/keycloak-cors-issue-when-being-redirected-to-login |
Thank you. |
This behaviour can be reproduced in the Example project using 'Interactive Authorization Code PKCE' option in 2024.
If i use useWebPopup: false, I got always immediately null as Authorization response.
If i use useWebPopup: true, I got always immediately ClientException: XMLHttpRequest error., uri=https://.../protocol/openid-connect/token
I tried this solution:
I read #44.
I follow the new example ahmednfwela commented on Jul 13, 2023
Now if i use useWebPopup: false, I got always
Error
at Object.throw_ [as throw] (http://localhost:49430/dart_sdk.js:12009:11)
at openidconnect.OpenIdConnectClient.__.loginInteractive (http://localhost:49430/packages/openidconnect/openidconnect.dart.lib.js:746:43)
at loginInteractive.next ()
at http://localhost:49430/dart_sdk.js:47139:33
at _RootZone.runUnary (http://localhost:49430/dart_sdk.js:46996:59)
at _FutureListener.thenAwait.handleValue (http://localhost:49430/dart_sdk.js:42384:29)
at handleValueCallback (http://localhost:49430/dart_sdk.js:42996:49)
at _Future._propagateToListeners (http://localhost:49430/dart_sdk.js:43034:17)
at [_completeWithValue] (http://localhost:49430/dart_sdk.js:42875:23)
at async._AsyncCallbackEntry.new.callback (http://localhost:49430/dart_sdk.js:42909:35)
at Object._microtaskLoop (http://localhost:49430/dart_sdk.js:47452:13)
at _startMicrotaskLoop (http://localhost:49430/dart_sdk.js:47458:13)
at http://localhost:49430/dart_sdk.js:43258:9
Now if i use useWebPopup: true, I got always immediately ClientException: XMLHttpRequest error., uri=https://.../protocol/openid-connect/token
The main problem is still there, not solved. Only the behavior for producing error is changed.
Any ideas? Our keycloak works fine. All settings include callback are fine.
Has anyone better experience with flutter package oidc (package:oidc) ?
The text was updated successfully, but these errors were encountered: