FormidableLabs / react-native-app-auth

React native bridge for AppAuth - an SDK for communicating with OAuth2 providers
https://commerce.nearform.com/open-source/react-native-app-auth
MIT License
2.01k stars 438 forks source link

App closes while capturing redirect form keycloak #955

Open saimur-crest opened 6 months ago

saimur-crest commented 6 months ago

Closes while being redirected

Upon successful authentication from keycloak, when the app is redirected, it closes immediately. I've used try catch block to see if it throws any error, but couldn't find any errors, and the code does not reach the next line after the authorize function invocation.

Environment

Configuration

// my keycloak sever is running at http://192.168.0.102:8080
{
    issuer: 'http://192.168.0.102:8080',
    clientId: 'owh-client',
    redirectUrl: 'io.identityserver.demo:/oauthredirect',
    additionalParameters: {},
    scopes: ['openid', 'profile', 'email', 'offline_access'],
    serviceConfiguration: {
      authorizationEndpoint: 'http://192.168.0.102:8080/realms/Test/protocol/openid-connect/auth',
      tokenEndpoint: 'http://192.168.0.102:8080/realms/Test/protocol/openid-connect/token',
    },
}