Azure AD B2C using MSAL with 2 Custom policies (ANDROID)

Rehman, Muhammad Saif 1 Reputation point
2022-01-06T16:35:38.92+00:00

We are building an app that has multiple authentication flows:

  1. General flow - User enters email, if that email exists it asks for password and user can log in.
  2. Magic Link - If the user is identified as an EXECUTIVE user after entering his/her email, he/she will receive a link to the email id that was entered and when the user clicks on the link, the user will redirect to the application and will be authenticated.

The flow starts with initiating the General Sign in, once the email is identified as executive then we need to clear the session and initial the Magic link policy.

We have the general flow working fine, but if the email is identified as an EXECUTIVE we are not able to clear the previous session so we can't trigger the magic link flow.

in iOS we have this method for canceling the session
class func cancelCurrentWebAuthSession() -> Bool

But for Android I haven't found an alternative that can be used to clear the previous session if user is identified as an EXECUTIVE user.

Can someone please advise how to handle this?

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,639 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,455 questions
0 comments No comments
{count} votes