question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

User is not redirected to redirect uri on mobile

See original GitHub issue

Core Library

MSAL.js v2 (@azure/msal-browser)

Core Library Version

2.24.0

Wrapper Library

MSAL React (@azure/msal-react)

Wrapper Library Version

1.4.0

Public or Confidential Client?

Public

Description

On mobile (safari and edge) when a user logs out, it hangs on the “you have logged out page” and the redirect uri does not seem to be triggered (user is never redirected to redirect uri)

Error Message

No response

Msal Logs

No response

MSAL Configuration

auth: {
        clientId: config.auth.clientId,
        authority: 'https://login.microsoftonline.com/consumers',
        redirectUri: `${config.auth.redirectUrl || config.sasUrl}/home`,
        navigateToLoginRequestUrl: false,
        postLogoutRedirectUri: `${config.auth.redirectUrl || config.sasUrl}`,
    },
    cache: {
        cacheLocation: BrowserCacheLocation.SessionStorage,
    }

Relevant Code Snippets

used button click to trigger signout, used instance.logoutredirect on button click

Reproduction Steps

  1. Open safari on mobile
  2. Click sign out button
  3. User is signed out, but never redirected back to redirect uri

Expected Behavior

User should be redirected to redirect uri

Identity Provider

Azure AD / MSA

Browsers Affected (Select all that apply)

Edge, Safari

Regression

No response

Source

Internal (Microsoft)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:25 (15 by maintainers)

github_iconTop GitHub Comments

3reactions
1hw7commented, Nov 3, 2022

Commenting to leave open, as the issue continues to persist

2reactions
1hw7commented, Aug 17, 2022

Thanks for your help Hector! Yes, it is and this works for us in desktop. The issue only arises on a mobile device edit: actually, it’s possible we didn’t configure this correctly! sorry, double checking now. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Redirect URI (reply URL) restrictions - Microsoft Entra
A redirect URI, or reply URL, is the location where the authorization server sends the user once the app has been successfully authorized...
Read more >
OAuth2 - mobile app redirection issue, stays in browser
If you want to use https redirect URIs then you will have to use app links to return to the app. It is...
Read more >
Redirect URI issue after successful login with @auth0/auth0 ...
User initiates login by calling loginWithRedirect · User is redirected to Auth0, including a redirectUri (in this case /callback) · User is, after ......
Read more >
Manually Build a Login Flow - Facebook Login - Documentation
Invoking the Login Dialog and Setting the Redirect URL · client_id . The ID of your app, found in your app's dashboard. ·...
Read more >
Configure a default app for the Sign-In Widget
Authenticated users in that case are still redirected to the initiating app, not the custom redirect URL that you configure in this procedure....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found