FormidableLabs / FormidableLabs/react-native-app-auth

Additional Parameters not being sent on authorize request with OpenId scope

Open
#822 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
473
PR merge metrics
No merged PRs in 30d

Description

## Issue

Hi! First time user of this library. I really like the simplicity of it although the lack of documentation in certain aspects makes it a little bit hard to wrap your head around sometimes.

As the title suggests I've been trying to make an authorize request using FusionAuth as my OpenID provider but it doesn't work, it kept throwing an error that said "issuer mismatch". Investigating further lead to the core issue, I have multiple tenants in my configuration and the fushionauth provider gets the first one by default, turns out I need to add a tenantId parameter to the request to differentiate between the default and the specific tenant that we want to use, so I added this id as an additional parameter (look below for my configuration). I've already checked and when I try to logout the URL does contain the `tenantId` parameter so this probably is an issue of the authorize path only.

```js
export const FUSIONAUTH_CONFIG = {
...
additionalParameters: {
tenantId: "tenant id"
},
scopes: ['openid'],
};
```
I expected the library to change the following request for the OpenId configuration
https://{issuer domain}/.well-known/openid-configuration

To
https://{issuer domain}/.well-known/openid-configuration?tenantId={tenant id}

Instead it kept trying to retrieve the configuration from the default tenant.
---

## Environment

* **Your Identity Provider**: FusionAuth
* **Platform that you're experiencing the issue on**: iOS
* **Are you using Expo?** Yes..

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.