The appState
parameter is missing for login with redirect on the web
#486
Labels
appState
parameter is missing for login with redirect on the web
#486
Checklist
Description
When implementing a login with redirect flow for Flutter Web, I initially got it working as expected, without adding any extra state for redirects. However, when I needed to implement a redirect after login, I had to look around on how to do that.
I had been referred to the following documentation, by a colleague of mine:
https://auth0.com/docs/secure/attack-protection/state-parameters
So I started implementing the workflow as described in that document.
However, the document mentions a
state
query parameter, without disclosing that Auth0 itself uses astate
query parameter in the redirect URL, for validation purposes in the Auth0 SDK.After some searching, I did find out that there is an
appState
parameter for the redirect login options.See the answer at https://community.auth0.com/t/how-to-preserve-client-state-after-loginwithredirect/95963/6
Then I did some digging and found that this parameter is defined in the SDK as stated in the comment above
https://github.com/auth0/auth0-spa-js/blob/f2e566849efa398ca599daf9ebdfbbd62fcb1894/src/global.ts#L298
However, the Flutter plugin lacks this field in its implementation.
Reproduction
http://localhost:3000
as callback url's for login / logoutappState
to the arguments ofloginWithRedirect()
, so that this state is returned back in the redirect url query parameters (albeit encoded)parameters
map does not work eitherAdditional context
No response
auth0_flutter version
1.7.2
Flutter version
3.24.3
Platform
Web
Platform version(s)
Google Chrome 131.0.6778.70
The text was updated successfully, but these errors were encountered: