-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Workplace Search] Fix confidential OAuth flow #111802
[Workplace Search] Fix confidential OAuth flow #111802
Conversation
Previously we were accepting "string | undefined" as `state` parameter. But if the `state` was not present in the URL, we received null. That was breaking the confidential flow in cases where `state` was not provided. This commit changes the type of parameter to "string | null" and fixes the flow in such cases.
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.
LGTM. Thanks for the videos!
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.
Thanks for fixing this @yakhinvadim! 🎉
💚 Build SucceededMetrics [docs]
To update your PR or re-run it, just comment with: |
Previously we were accepting "string | undefined" as `state` parameter. But if the `state` was not present in the URL, we received null. That was breaking the confidential flow in cases where `state` was not provided. This commit changes the type of parameter to "string | null" and fixes the flow in such cases.
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Previously we were accepting "string | undefined" as `state` parameter. But if the `state` was not present in the URL, we received null. That was breaking the confidential flow in cases where `state` was not provided. This commit changes the type of parameter to "string | null" and fixes the flow in such cases. Co-authored-by: Vadim Yakhin <[email protected]>
Summary
Fixes https://github.com/elastic/workplace-search-team/issues/2010
Previously we were accepting "string | undefined" as
state
parameter.But if the
state
was not present in the URL, we actually received null.That was breaking the confidential flow in cases where
state
was not provided.This commit changes the type of parameter to "string | null" which fixes the flow in such cases.
Before:
(Authorize)
Screen.Cast.2021-09-09.at.5.07.03.PM.mp4
(Deny)
Screen.Cast.2021-09-09.at.5.06.50.PM.mp4
After:
(Authorize)
Screen.Cast.2021-09-09.at.4.41.36.PM.mp4
(Deny)
Screen.Cast.2021-09-09.at.5.01.02.PM.mp4
Checklist
Delete any items that are not applicable to this PR.
For maintainers