Closed jonasbark closed 3 years ago
Hi, usually, flutter web urls have a #
(url fragment) in it which causes a clash with keycloak because keycloak uses same url fragment to persist state information . So, when keycloak passes the state fragment, flutter will see it as a url and try to parse it as one there by leading to route not found error or sometimes keycloak is not able to process or persist the state information.
configureUrlStrategy()
tried to circumvent this by removing the #
in the url so instead of your url looking like www.domain.com/#/home
it looks like www.domain.com/home
then keycloak can add its state information like `www.domain.com/home#state=1234&session=12345
Now, this was the case with the last version of flutter beta, but i haven't had the time to look at it since the new version was released. I will take a look at it today for sure.
Are you able to use keycloak just fine without the url strategy? what flutter version do you use?
Thanks for the explanation - I'll keep this in mind.
This is the how the URL looks after logging in:
https://.../subdirectory/#state=...&session_state=...&code=...
And after keycloak-js extracts the information:
https://app.propops.com/dev/dashboard-flutter/#/
Seems to work fine.
I'm using dev 1.26.0-17.1.pre.
Hi there!
The readme mentions
yet it seems to work just fine without this. Can you clarify why it is deemed required?