-
Notifications
You must be signed in to change notification settings - Fork 16
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 instanceUrl validation #28
base: master
Are you sure you want to change the base?
Conversation
Change auth mode name for backward compatibility.
@@ -11,6 +11,7 @@ | |||
|
|||
<authUri>/oauth2/v2.0/authorize</authUri> | |||
<tokenUri>/oauth2/v2.0/token</tokenUri> | |||
<instanceUrlValidationRegex>^https:\/\/([a-zA-Z0-9-.]+\.)?((microsoftonline\.(com|us|cn|de))|chinacloudapi\.cn)\/(.*)</instanceUrlValidationRegex> |
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.
This is for additional security enhancement to guarantee we will not go to a malicious url even someone open the twb and manually change the instanceUrl and send to a victim.
@@ -19,6 +20,10 @@ | |||
<scopes>2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/user_impersonation</scopes> | |||
|
|||
<capabilities> | |||
<entry> | |||
<key>OAUTH_CAP_REQUIRES_PROMPT_SELECT_ACCOUNT</key> |
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.
This is for always prompt user to select an account instead of directly log them in if they're already logged in.
This is an in-addition protection besides the dialog UI validation and is necessary.