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
Add option --prompt-hint
to enable customized header text for WAM prompts and web mode.
#11
Conversation
I am curious why header text is an option? Isn't header text going to be automatically generated to let users know what triggered a prompt? Why would a user add header text as an option? |
Co-authored-by: Shalini Khare <31912044+shalinikhare27@users.noreply.github.com>
I think this option should be filled by the caller. Maybe @kyle-rader can explain more clear. |
Technically this change looks sound. All the code is in the right spot and it's very clean, @goagain. Following on from what @shalinikhare27 said though, I have some questions. I'm interested to know what you and @kyle-rader think about these issues.
|
The default header text is something like "Let's get you signed in" There are 2 scenarios where app developers wanted to use this:
From the SDK perspective:
|
The code looks good @kyle-rader , but I just want to make you aware of the experience with the latest MSAL. If your app targets only Work and School accounts, i.e. authority ends in So this header text will only appear if the applicaiton targets both AAD and MSA users. |
--caller
to enable customized header text for WAM prompts and web mode.
@goagain @reillysiemens I'm good with |
--caller
to enable customized header text for WAM prompts and web mode.--prompt-hint
to enable customized header text for WAM prompts and web mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I caught one test method that could use a better comment, otherwise I'd be happy to put a ✅ on this.
Overview
Taking advantage of this feature will give us a small UX improvement to let WAM based dialogs show header text to indicate what application is requesting auth. When an Auth prompt launches either by native window or web prompt, it’s often hard to know what actually triggered it. Enabling header text in WAM window could help users to know that.
Ref: microsoft-authentication-library-for-dotnet #3125
Change log
Add option
--prompt-hint
in command line and optionprompt_hint
in TOML config file.Test Case
--debug --resource=6e979987-a7c8-4604-9b37-e51f06f08f1a --client=5af6def2-05ec-4cab-b9aa-323d75b5df40 --tenant=9188040d-6c67-4c5b-b112-36a304b66dad --mode=broker --prompt-hint="test header text"
Note
The resource ID
1a0aa568-29b5-4a0c-b895-89da91675dcc
and client IDc332fbf4-f566-4550-ba1f-83a2f68fe068
are randomly generated. The tenant ID9188040d-6c67-4c5b-b112-36a304b66dad
is Microsoft account tenant ID. See Microsoft identity platform access tokens.Overcome Sample
Update on Apr 7th, 2022:
Per discussed with @kyle-rader,
caller
is a better name thanheader-text
. With APIWithEmbeddedWebViewOptions
, the title in web mode can also be modified. Therefore, web mode can be also supported.Web Mode Overcome
Update on Apr 13th, 2022:
--prompt-hint
.