Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add onRedirectNavigate callback to stop navigatation and get redirect url #1691

Merged
merged 4 commits into from Jun 3, 2020

Conversation

jasonnutter
Copy link
Contributor

@jasonnutter jasonnutter commented May 22, 2020

This adds a new callback for loginRedirect and acquireTokenRedirect to allow applications to get the URL that would be navigated to, and to stop navigation. This is to support scenarios where applications want to perform the redirect themselves, instead of relying on MSAL.

Usage:

msal.loginRedirect({
  onRedirectNavigate: url => {
    // url that would be navigated to
    console.log(url);
   
     // Applications must explicitly return false to stop navigation
     return false;
  }
})

@coveralls
Copy link

coveralls commented May 22, 2020

Coverage Status

Coverage increased (+0.05%) to 78.414% when pulling 7b68ffc on onRedirectNavigate into c6e60bd on dev.

Copy link
Collaborator

@tnorling tnorling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the msal@1.x Related to msal@1.x (implicit flow) label Jun 2, 2020
@jasonnutter jasonnutter added this to the msal@1.3.2 - Release milestone Jun 2, 2020
@Inframatic
Copy link

Inframatic commented Oct 19, 2021

How could one transform that received redirect URL and pass that in as the new redirect url?

My purpose would be editing the redirect url to remove the login_hint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msal@1.x Related to msal@1.x (implicit flow)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: API for retrieving the redirect url for MSAL.AcquireTokenRedirect
5 participants