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

Not storing token in storage correctly #5120

Closed
rahulraajtanwar opened this issue Aug 19, 2022 · 3 comments
Closed

Not storing token in storage correctly #5120

rahulraajtanwar opened this issue Aug 19, 2022 · 3 comments
Assignees
Labels
answered Question has received "first qualified response" b2c Related to Azure B2C library-specific issues bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package 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

@rahulraajtanwar
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?

Confidential

Description

Stored token information is different in 2 separate packages with the same library version.

Error Message

No response

Msal Logs

No response

MSAL Configuration

{
     auth: {
      clientId: 'f6154650-169f-4b7a-998f-5b9cec24177e',
      authority: 'https://thrivepasslogin.b2clogin.com/tfp/thrivepasslogin.onmicrosoft.com/B2C_1_susi',
    },
    cache: {
      cacheLocation: BrowserCacheLocation.SessionStorage,
      storeAuthStateInCookie: false
    }
}

Relevant Code Snippets

Same as in your sample.
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v2-samples/angular13-rxjs7-sample-app

Reproduction Steps

Same as in your sample.
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-v2-samples/angular13-rxjs7-sample-app

Expected Behavior

Should be storing the token like this
image

But storing them like this
image

Identity Provider

Azure B2C Basic Policy

Browsers Affected (Select all that apply)

Edge

Regression

No response

Source

Internal (Microsoft)

@rahulraajtanwar rahulraajtanwar added bug-unconfirmed A reported bug that needs to be investigated and confirmed question Customer is asking for a clarification, use case or information. labels Aug 19, 2022
@ghost ghost added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Aug 19, 2022
@rahulraajtanwar rahulraajtanwar changed the title Not storing token in storage Not storing token in storage correctly Aug 19, 2022
@github-actions github-actions bot added b2c Related to Azure B2C library-specific issues confidential-client Issues regarding ConfidentialClientApplications msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package labels Aug 19, 2022
@ghost ghost assigned jennyf19, jmprieur and bgavrilMS Aug 19, 2022
@jasonnutter jasonnutter added public-client Issues regarding PublicClientApplications and removed confidential-client Issues regarding ConfidentialClientApplications labels Aug 19, 2022
@derisen
Copy link
Contributor

derisen commented Aug 22, 2022

@rahulraajtanwar I think you are looking at the temporary auth artifacts that msal is caching. If you have configured your msal with cacheLocation: "localStorage", durable cache entries will be stored in local storage (your 1st screenshot). msal also caches some temporary entries, and they will be in the session storage (or memory storage if you specify it in configuration). Checkout the caching doc for more.

@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 Aug 22, 2022
@ghost
Copy link

ghost commented Aug 28, 2022

@rahulraajtanwar 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 Aug 28, 2022
@derisen derisen assigned derisen and unassigned hectormmg Aug 29, 2022
@derisen
Copy link
Contributor

derisen commented Aug 30, 2022

Closing let us resolved. Let us know if you have further questions.

@derisen derisen closed this as completed Aug 30, 2022
@ghost ghost removed the Needs: Author Feedback Awaiting response from issue author label Aug 30, 2022
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" b2c Related to Azure B2C library-specific issues bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package 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

7 participants