React-native-app-auth: Redirect not working after successful login - react native

Created on 25 Mar 2019  路  3Comments  路  Source: FormidableLabs/react-native-app-auth

Issue

Window is not closing after successful login. I have used the sample code from the repository.


Environment

  • Your Identity Provider: PingFederate
  • Platform that you're experiencing the issue on:

    • [ ] iOS

    • [ X] Android

    • [ ] iOS but have not tested behavior on Android

    • [ X] Android but have not tested behavior on iOS

    • [ ] Both

  • Are you using Expo, e.g. ExpoKit?

    • [x] No

    • [ ] Yes, I've _not_ ejected

    • [ ] Yes, but I have ejected to ExpoKit

    • [ ] Yes, but I have ejected to vanilla React Native

Most helpful comment

The issue were related to redirect uri only:
In my case config have redirectUrl: 'x-cmpname-apname://oauth2/authorize'
and when I apply "x-cmpname-apname" instead of 'x-cmpname-apname://oauth2/authorize' into android/app/build.gradle it started working.

    manifestPlaceholders = [
      appAuthRedirectScheme: "x-cmpname-apname"
    ]

All 3 comments

I have already gone through the https://github.com/FormidableLabs/react-native-app-auth/issues/219 but that not help me

Hi - not redirecting back to the app is definitely an issue with the redirect uri. Can you check that the uri you specified in the config and in PingFederate and in android/app/build.gradle is the same.

The issue were related to redirect uri only:
In my case config have redirectUrl: 'x-cmpname-apname://oauth2/authorize'
and when I apply "x-cmpname-apname" instead of 'x-cmpname-apname://oauth2/authorize' into android/app/build.gradle it started working.

    manifestPlaceholders = [
      appAuthRedirectScheme: "x-cmpname-apname"
    ]
Was this page helpful?
0 / 5 - 0 ratings