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

typescript sample: is this expected behavior? #6285

Closed
lekpeng opened this issue Aug 3, 2023 · 3 comments
Closed

typescript sample: is this expected behavior? #6285

lekpeng opened this issue Aug 3, 2023 · 3 comments
Assignees
Labels
msal-browser Related to msal-browser package msal-react Related to @azure/msal-react public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.

Comments

@lekpeng
Copy link

lekpeng commented Aug 3, 2023

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

3.0.0-beta.0

Wrapper Library

MSAL React (@azure/msal-react)

Wrapper Library Version

2.0.0-beta.0

Public or Confidential Client?

Public

Description

In the typescript sample provided if I login and logout using redirect,

  1. I note the logout does not redirect me back to the main page but I see the "You signed out of your account It's a good idea to close all browser windows." microsoft page instead. Is this expected?

  2. Now if I try to navigate back in the same tab (by typing the URL not using the back button) to reattempt a login, I get the "interaction_in_progress" error. Just want to understand if this is expected behavior as well?

I only modified the msalConfig to use my own Client ID and Authority

MSAL Configuration

export const msalConfig: Configuration = {
    auth: {
        clientId: MYCLIENTID,
        authority: MYAUTHORITY,
        redirectUri: "/",
        postLogoutRedirectUri: "/",
    },
};

Relevant Code Snippets

No response

Identity Provider

Azure AD / MSA

Source

External (Customer)

@lekpeng lekpeng added the question Customer is asking for a clarification, use case or information. label Aug 3, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Aug 3, 2023
@github-actions github-actions bot added msal-browser Related to msal-browser package msal-react Related to @azure/msal-react public-client Issues regarding PublicClientApplications labels Aug 3, 2023
@hectormmg
Copy link
Member

@lekpeng what you describe is not expected behavior, you should be getting redirected back, and that's when the "interaction_in_progress" flag would get removed so you can log in again. However, I wasn't able to reproduce the behavior you described on the sample as it is on our repo. Can you elaborate on any changes you've made to the default configuration? I tried both logout redirect and logout popup, I did get the "You've been logged out" window but I was redirected back to the main app shortly after, as expected. Are you closing the tab too soon maybe?

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Aug 6, 2023
@lekpeng
Copy link
Author

lekpeng commented Aug 7, 2023

@hectormmg I think my issue is similar to the issue posted here as the redirect upon logout also only works in safari but not chrome. However in my case, my azuread authority must include the tenant id or the login will not work. I have posted a comment there as well, not sure if you wish to continue from that issue or here. Thanks.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 Awaiting response from the MSAL.js team and removed Needs: Author Feedback Awaiting response from issue author labels Aug 7, 2023
@hectormmg
Copy link
Member

Closing since #5783 is more appropriate for tracking this issue

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs: Attention 👋 Awaiting response from the MSAL.js team label Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msal-browser Related to msal-browser package msal-react Related to @azure/msal-react 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

2 participants