-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Allow overriding log level and PII setting with session storage key-values #6704
Conversation
konstantin-msft
commented
Nov 17, 2023
•
edited
Loading
edited
- Allow overriding log level and PII setting with session storage key-values to troubleshoot errors in non-dev environments.
bfd9c60
to
f611fd1
Compare
02a79e5
to
a541ba1
Compare
2289273
to
de49df6
Compare
de49df6
to
ded6160
Compare
ded6160
to
804444d
Compare
804444d
to
79a5590
Compare
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.
Looks good - recommend adding a couple tests as well
lib/msal-browser/docs/logging.md
Outdated
|
||
Add `msal.browser.log.pii` key to `Session Storage`, set it's value to `true` or `false` and refresh the page. |
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.
Minor suggestion - 0 or 1 may be easier/less error prone than using string values
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 would prefer to stick to true
/false
to be consistent with the pii setting in the MSAL config.
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.
Tests?
lib/msal-browser/docs/logging.md
Outdated
### Navigate to session storage | ||
|
||
1. Open developer tools by pressing F12 | ||
2. Navigate to `Application` tab |
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.
These instructions vary per browser. For instance, Firefox is Developer Tools -> Storage Tab... The Application tab isn't needed here. Can you update these to be called out per browser.
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.
That's a very good call, thank you. Updated docs.
lib/msal-browser/docs/logging.md
Outdated
|
||
Add `msal.browser.log.pii` key to `Session Storage`, set it's value to `true` or `false` and refresh the page. |
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.
We need more steps here. This should be something we can refer folks to for log collection and troubleshooting. Something along the lines of:
Once you have enabled Verbose logging and (optionally) enabled PII logging, refresh the page and retry the sign-in operation. The captured logs can be found *here*. Please review them to ensure there is no sensitive data included in them before sharing them with the team requesting them.
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.
Updated docs, thank you for the suggestion.
- Addressed review comments. - Added unit tests.
- Addressed review comments. - Added unit tests.
0462f25
to
72fd38a
Compare
Added tests |