MaikuB / flutter_appauth

A Flutter wrapper for AppAuth iOS and Android SDKs
273 stars 246 forks source link

[Feature Request] Allow `state` parameter to be `null` for AuthorizationTokenRequest #454

Closed weihenglim closed 1 week ago

weihenglim commented 12 months ago

The Android AppAuth library allows the state parameter to be optional by setting it to null (https://github.com/openid/AppAuth-Android/issues/615). This is useful for authorizing against a server that does not support the state parameter (e.g. Singpass, see: https://github.com/MaikuB/flutter_appauth/issues/436).

Currently this wrapper does not provide the option to set the state parameter and it defaults to a randomly generated value, which causes a Response state param did not match request state error when the server doesn't return a state parameter.

It would be helpful if we can have an option to explicitly set the state parameter to null to make it optional. Any possible workarounds are also welcomed, thank you.

MaikuB commented 12 months ago

Don't have a workaround for you and if you're after this feature then you would need to submit a PR for it