I'm currently working with the @azure/msal-browser
library and I came across the term InteractionType
.
Which is mentioned as an Enum in the documentation link to documentation (archived).
However, I couldn't find detailed information on how to use it and its purpose.
Could someone please provide a more comprehensive explanation of what InteractionType
is used for within the context of @azure/msal-browser
?
It would be great to have some code examples or practical scenarios where this enum comes into play.
I appreciate any insights or references to relevant resources that can help me understand this concept better.
Interaction type defines how a user of the application protected by Azure AD will authenticate themselves.
If the interaction type is Redirect
, the user will be redirected to Azure AD for authentication. Here they will essentially leave your application and once they are successfully authenticated, they will be redirected back to your application.
If the interaction type is Popup
, user will be presented with a popup where there can sign in (if needed). Here the user never leaves your application and the authentication interaction happens in a popup.
If the interaction type is Silent
, MSAL will try to authenticate user based on existing token stored somewhere in cache used by MSAL.