Skip to content

Error while using response_mode as an additional parameter (Android) #1112

@sanjayrathod-mri

Description

@sanjayrathod-mri

Issue

I am using this package in a react-native application (Android) which uses Okta identity provider.
I am facing an issue during authentication when I pass response_mode, as an additional parameter.
My IdP's default response mode is form_post. Hence, I need to explicitly set response_mode: query to get authentication process working for my app.

Below is the snippet:

const result = await authorize({
  // issuer, clientId, redirectUrl, scopes etc.
  additionalParameters: {
    response_mode: 'query',
  }
});

After initiating the authentication process, it fails before redirecting to our Okta login page.

Error: Parameter response_mode is directly supported via the authorization request builder, use the builder method instead

I believe, we will have to set it in RNAppAuthModule.java using setResponseMode() to pass it forward.


Related issues

Support for response mode is missing #917


Environment

  • Your Identity Provider: Okta (organization)
  • Platform that you're experiencing the issue on: Android
  • Your react-native Version: 0.72.6
  • Your react-native-app-auth Version: 7.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions