Sign in with Google on iOS with predefined state not possible #965
Labels
issue-accepted
This issue has been confirmed and accepted by the maintainers
needs-triage
Waiting for a member of the team to confirm
My OIDAuthorizationRequest needs a predefined state. Since there is no parameter in the interface I tried it with the additional parameters. That works but there is an issue with the default behaviour on iOS or in the objc implementation respectively:
RNAppAuth.m
Iff the state is present in the additional parameters, it gets taken from there but if it's there the lib will add it too. So the state is attached twice.
For reference: The java code on the other hand removes the state from the additional parameters after reading the state. So it gets added only once. Which is the right approach if u ask me.
The Problem with the whole thing is, that the double attachment of the state leads to an invalid_request on the google side. (Apple seems not to be picky. At least if the key value pair is the same). looks like in the screenshot attached:
My current workaround is; setting the state parameter to nil since the value is nullable and add it via the additional parameters from the react native js side.
Environment
IDP: Zitadel / Google
platform: iOS
react native: v0.73.4
react native app auth: ^7.1.0
No expo
The text was updated successfully, but these errors were encountered: