How to remove the back button from the msal login page?

Shah, Zil [JJCUS NON-J&J] 21 Reputation points
2022-10-13T06:40:46.58+00:00

We are using Microsoft identity platform and OAuth 2.0 authorization for login into our application. We want to disable the 'Back' button on this page as this is the start page and we want to restrict the user to click on 'Back' button. Any idea how we can do that? Any leads will be much appreciated.

249945-image.png

249972-login-page.png

Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
7,155 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,282 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,141 questions
{count} votes

Accepted answer
  1. Akshay-MSFT 17,871 Reputation points Microsoft Employee
    2022-10-18T03:21:00.33+00:00

    Hello @Shah, Zil [JJCUS NON-J&J] ,

    Thanks for posting your query on Q&A. As of now there is no option to edit or remove the "back" option from MSAL "Sign in" page. You may post an idea regarding this at our Feedback Portal which is reviewed by the product team.

    You can use the Oauth parameters login_hint and hsu, https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-js-sso#with-user-hint

    • The login_hint=your_username@your_domain.com parameter pre-populates the username and directly take you to the enter password screen.
    • The hsu=1 parameter removes the "Sign in with another account" link from the enter password screen. That way users won't get an option to revert back to the sign-in page and select sign-in options.

    Thanks,
    Akshay Kaushik

    Please "Accept the answer" and "Upvote" if the above-mentioned suggestion works as per your business need. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful

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.