Hello,
We are building a web application and a react native mobile application that uses the respective okta libraries.
We have a token hook setup in okta that takes variables passed to it via the config state and then it adds some info to the token.
In our web implementation, we define the state in the config option below. okta-auth-js
It seems that the state field is not available on the okta-react-native implementation. Is it possible to send state with this library? or is this feature not yet implemented?
okta-react-native
Our token hook just gets a random string, which is the default value for this field, when using okta-react-native.
Can you try passing in an oktaAuthConfig into the createConfig method, with the ‘state’ set in the oktaAuthConfig object? It looks like this should be possible since okta-react-native v1.12.0
After looking at this approach, it doesn’t seem to work for our needs.
It appears that the js okta auth library is not used for the authorization part of this. It uses a native ios/android okta auth instance. The okta-react-native library doesn’t pass state into those. See the line below, it just passes in the session token.