Skip to content

8.0.1 and 8.0.2 - Failed to Logout in iOS (Unable to open safari browser) #1071

Open
@Ajithkumar2203

Description

@Ajithkumar2203

Issue

For Login works fine

configIdp: {
   issuer: "https://xxx-xxx.xxxxxx.com/oauth2/xxxxxxxxxxxxxxx",
   clientId: "xxx-xxxxx_uat_native_xxxxxxxxxxxxxx",
   redirectUrl: "com.xxxxxxx.xxxxxxxx:/login",
   logoutRedirectUrl: "com.xxxxxxx.xxxxxxxx:/logout",
   scopes: ["openid", "offline_access", "apis.default", "default", "legacy"],
   iosPrefersEphemeralSession: true
 },

Login.JS

import { authorize } from 'react-native-app-auth';

            return authorize(this.props.configIdp).then(res => {
            })

While
Logout.js

 import { logout as oktaLogout } from 'react-native-app-auth';
        const config = store.getState()?.properties?.properties?.configIdp;
        const idToken = store.getState()?.app?.loginInfo?.idToken
        try {
            const res = await oktaLogout(config, { idToken, postLogoutRedirectUrl: config.logoutRedirectUrl });
        } catch (err) {
          console.log(err)
        }

Log: Unable to open safari

It works fine in the previous version 8.0.0 after upgrading to 8.0.1 or 8.0.2 facing this issue
Note: But it works fine in simulator

Im facing this logout issue only after uploading my app to appstore - test flight build

Environment

  • Identity Provider: Okta
  • Platform that you're experiencing the issue on: iOS
  • react-native Version: 0.78.0
  • ** react-native-app-auth Version**: 8.0.2
  • Are you using Expo? No

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