Skip to content

Sign Out with 'logout' method doesn't close webView automatically #715

@pavelsokolov21

Description

@pavelsokolov21

Issue

Hi Team!

I want to logout from the system by the method logout. It works but with this errors:

For iOS:

[Error: The operation couldn’t be completed. (org.openid.appauth.general error -3.)]

For Android:

[Error: User cancelled flow]

This error happens because I click on the close button after successfully signing out on the third-party screen. But I know that logout was successful because I don't see the label Signed In under the profile.
Looks like that might be related to redirect URL or something like that. Could someone help me with this issue?

Screenshots

Third-party screen: https://www.dropbox.com/s/jobnd7svfcvqswx/Screenshot%202022-02-25%20at%2010.49.42%20AM.png?dl=0
Error Android: https://www.dropbox.com/s/3u8s2hckabljrvs/Screenshot%202022-02-25%20at%2010.50.08%20AM.png?dl=0

Code

Config:

const config = {
  issuer:
    'https://login.microsoftonline.com/tenant_id/v2.0',
  clientId: AZURE_AD_CLIENT_ID,
  redirectUrl: 'rtprn://react-native-template/',
  scopes: ['openid', 'offline_access', 'profile'],
  additionalParameters: { prompt: 'select_account' },
}

logout:

await logout(config, {
    idToken: idToken,
    postLogoutRedirectUrl: 'rtprn://react-native-template/',
});

Environment

  • Your Identity Provider: Azure
  • Platform that you're experiencing the issue on: both
  • Are you using Expo?: no

Metadata

Metadata

Assignees

No one assigned

    Labels

    third-partyBlocked by a dependency outside of our control

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions