Home  >  Q&A  >  body text

Analyze and understand the use and purpose of InteractionType in @azure/msal-browser

I'm currently using the @azure/msal-browser library and came across the term InteractionType.

Mentioned as an enum in the documentation link (archived).

However, I can't find details on how to use it and what it is used for.

Can someone explain more fully the purpose of InteractionType in the context of @azure/msal-browser?

It would be great if there were some code examples or actual scenarios where this enum comes into play.

I would appreciate any insights or references to relevant resources that can help me better understand this concept.

P粉333395496P粉333395496179 days ago362

reply all(1)I'll reply

  • P粉752812853

    P粉7528128532024-03-27 10:20:58

    Interaction types define how users of Azure AD-protected applications authenticate themselves.

    If the interaction type is Redirect, the user will be redirected to Azure AD for authentication. Here they will basically leave your application and once successfully authenticated they will be redirected back to your application.

    If the interaction type is Popup, the user will see a popup window where they can log in (if needed). Here, the user never leaves your application and the authentication interaction happens in a popup window.

    If the interaction type is Silent, MSAL will attempt to authenticate the user against an existing token stored in the cache used by MSAL.

    reply
    0
  • Cancelreply