Logout redirect back to app

Martin Georgiu 11 Reputation points
2022-05-26T14:08:38.017+00:00

Hi, we're using Azure Active Directory for authentication of our flutter app on iOS (we use flutter_appauth which is just wrapper around AppAuth-iOS which I believe is an industry-standard lib for this work). Login works flawlessly and the browser popup is automatically closed right after I pass the correct password.

However, for the logout, the user stays on the "You've signed out here, but you may need to manually sign out from other apps." page and the only way to close such popup is with the native ios "Cancel" button on the browser popup. AFAIK there should be a way to automatically redirect back to the app after the logout and close the popup automatically like it is done during login.

For that I believe is "Front-channel logout URL" or "logoutUrl" in Manifest, but that cannot contain custom schemes (which is strange as they work completely fine for the login).

Are we missing something? thx in advance

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,103 questions
{count} votes

2 answers

Sort by: Most helpful
  1. James Hamil 25,236 Reputation points Microsoft Employee
    2022-05-31T18:24:16.587+00:00

    Hi @Martin Georgiu , have you reviewed this thread? You're correct in needing to change the logout URL. There are a few workarounds you can try for this.

    1. https://stackoverflow.com/questions/46762970/azure-active-directory-post-sign-out-url
    2. https://stackoverflow.com/questions/56740143/how-to-specify-custom-logout-url-when-using-azure-ad-authentication-in-net-core

    Please let me know if you've already tried these or if you have any questions!

    Best,
    James


  2. ianrussel adem 0 Reputation points
    2023-03-23T22:30:40.3+00:00

    Hi, I am facing same issue. I am using this endpoint for the user redirected to homepage after logging out

     "https://login.microsoftonline.com/6547512e-7708-48c6-b6ed-d1172cb2ddd7/oauth2/v2.0/logout?post_logout_redirect_uri=https%3A%2F%2Fmycompany.co.nz%2F"
    
    
    

    However , when redirected back to homepage, the user is still authenticated. The only way to force logout is to close and reopen browser after logging out, which really not a good thing for the user's experience. Any idea how to fix?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.