gmlion
gmlion

Reputation: 308

AADSTS50011 - The reply url specified in the request does not match the reply urls configured for the application

I'm getting this error while trying to use OpenID to login from my mobile app.

I'm using React Native App Auth (https://github.com/FormidableLabs/react-native-app-auth#azure-active-directory) to authenticate my app to AAD. The same setup is already working with Okta and Google OpenID providers.

These are the settings I'm using on the app:

{
  issuer: 'https://login.microsoftonline.com/{directory_id}/v2.0',
  clientId: {my_client_id},
  redirectUrl: 'com.krev.krev://oauth2redirect',
  scopes: ['openid', 'profile', 'email']
}

and this is the relevant info in the app manifest on AAD:

"replyUrlsWithType": [
    {
        "url": "com.krev.krev://oauth2redirect",
        "type": "InstalledClient"
    }
],

I already tried changing "oauth2AllowUrlPathMatching" to no avail

Upvotes: 1

Views: 1384

Answers (2)

gmlion
gmlion

Reputation: 308

Not really relevant, but it was an error on my side. I was overriding the url in another place in the code.

Upvotes: 2

Philippe Signoret
Philippe Signoret

Reputation: 14326

I notice several of the redirectUrl examples in https://github.com/FormidableLabs/react-native-app-auth use the pattern <scheme>:/<something> (with only one forward slash /), but in the settings you shared, you have <scheme>://<something> (with two forward slashes //). You may have accidentally left only one slash and authorized two slashes (or vice versa), or had another typo.

Upvotes: 2

Related Questions