Which code segment should you insert at line 06?

Posted by: Pdfprep Category: MS-600 Tags: , ,

You need to complete the MSAL.js code for SSO.

Which code segment should you insert at line 06?
A . storeAuthStateInCookie: false
B . storeAuthStateInCookie: true
C . cacheLocation: ‘localStorage’
D . cacheLocation: ‘sessionStorage’

Answer: C

Explanation:

Scenario: Implement single sign-on (SSO) and minimize login prompts across browser tabs.

When your application is open in multiple tabs and you first sign in the user on one tab, the user is also signed in on the other tabs without being prompted. MSAL.js caches the ID token for the user in the browser localStorage and will sign the user in to the application on the other open tabs.

By default, MSAL.js uses sessionStorage which does not allow the session to be shared between tabs. To get SSO between tabs, make sure to set the cacheLocation in MSAL.js to localStorage.

Reference: https://docs.microsoft.com/bs-latn-ba/Azure/active-directory/develop/msal-js-sso

Leave a Reply

Your email address will not be published.