FormidableLabs / FormidableLabs/react-native-app-auth

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

Open
#1,071 2 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

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

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.