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

handleRedirectObservable returns only the HANDLE_REDIRECT_END when using the redirect url from a new tab. #5507

Closed
hansakaRightS opened this issue Dec 29, 2022 · 6 comments
Assignees
Labels
answered Question has received "first qualified response" msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package Needs: Author Feedback Awaiting response from issue author no-issue-activity Issue author has not responded in 5 days public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.

Comments

@hansakaRightS
Copy link

Core Library

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

Core Library Version

2.22.1

Wrapper Library

MSAL Angular (@azure/msal-angular)

Wrapper Library Version

2.1.2

Public or Confidential Client?

Public

Description

We have the MSAL login with the redirect option implemented in angular, which is working fine if everything is happening in the same tab. but if we copy the redirected url to a new tab and login using valid credentials, handleRedirectObservable method only returns the HANDLE_REDIRECT_END without any token info.

and when ever we invoke the login function again manually we get the login success as Normal.

I want user to get the login success as normal event if they uses the url in a new tab.

MSAL Configuration

auth: {
        clientId: clientId,
        authority: "B2C_1A_SIGNUP_SIGNIN",
        redirectUri: '/',
        navigateToLoginRequestUrl: false
    },
    cache: {
        cacheLocation: "LocalStoarage",
        storeAuthStateInCookie: false
    }

Relevant Code Snippets

No response

Identity Provider

None

Source

External (Customer)

@hansakaRightS hansakaRightS added the question Customer is asking for a clarification, use case or information. label Dec 29, 2022
@ghost ghost added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Dec 29, 2022
@github-actions github-actions bot added msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications labels Dec 29, 2022
@ghost ghost assigned tnorling Dec 29, 2022
@tnorling
Copy link
Collaborator

@HansakaSS I'm not sure I understand your scenario. Can you give me a step by step?

@ghost ghost added answered Question has received "first qualified response" Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Dec 29, 2022
@hansakaRightS
Copy link
Author

@tnorling thanks for the reply.
yes. whenever we use the redirect option to login, and after we redirected to the login page and we copy the page url to a new tab and continue the login i can face this issue.
it redirect me back to my application but i don't have the success login. also i can see the state and client_info on the address after the redirect back to the application.

  1. invoke redirect login
  2. from the login page copy the URL to a new tab
  3. login using the valid credentials
  4. getting redirect back to the application but I'm not getting the msal:loginSuccess. only gets the msal:handleRedirectEnd from handleRedirectObservable.

@ghost ghost added Needs: Attention 👋 Awaiting response from the MSAL.js team and removed Needs: Author Feedback Awaiting response from issue author labels Dec 30, 2022
@tnorling
Copy link
Collaborator

This is not a supported scenario. Login must be initiated and completed from within the same session (tab). Can you tell me a little more about why you need to open the login page in a new tab?

@ghost ghost added Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Dec 30, 2022
@hansakaRightS
Copy link
Author

thanks for the clarification. Its not that we are opening the login in a new tab. problem occurs if we use a password vault to log in. for example zoho.

@ghost ghost added Needs: Attention 👋 Awaiting response from the MSAL.js team and removed Needs: Author Feedback Awaiting response from issue author labels Jan 2, 2023
@tnorling
Copy link
Collaborator

tnorling commented Jan 3, 2023

Its not that we are opening the login in a new tab.

I'm a bit confused by this statement because this seems to conflict what you stated in your previous comment:

  1. from the login page copy the URL to a new tab

Can you please clarify?

problem occurs if we use a password vault to log in. for example zoho.

Can you please go into more detail about this? I don't understand how this relates.

@ghost ghost added Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Jan 3, 2023
@tnorling tnorling assigned bmahall and unassigned tnorling Jan 3, 2023
@ghost
Copy link

ghost commented Jan 9, 2023

@HansakaSS This issue has been automatically marked as stale because it is marked as requiring author feedback but has not had any activity for 5 days. If your issue has been resolved please let us know by closing the issue. If your issue has not been resolved please leave a comment to keep this open. It will be closed automatically in 7 days if it remains stale.

@ghost ghost added the no-issue-activity Issue author has not responded in 5 days label Jan 9, 2023
@ghost ghost closed this as completed Jan 16, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered Question has received "first qualified response" msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package Needs: Author Feedback Awaiting response from issue author no-issue-activity Issue author has not responded in 5 days public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.
Projects
None yet
Development

No branches or pull requests

3 participants