-
Notifications
You must be signed in to change notification settings - Fork 316
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
Fix broken login flow #9965
Merged
Merged
Fix broken login flow #9965
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MrFlashAccount
requested review from
PabloBuchu,
indiv0,
somebody1234,
Frizi,
farmaazon,
vitvakatu and
kazcw
as code owners
May 15, 2024 13:19
MrFlashAccount
added
CI: No changelog needed
Do not require a changelog entry for this PR.
--bug
Type: bug
g-dashboard
labels
May 15, 2024
MrFlashAccount
commented
May 15, 2024
somebody1234
approved these changes
May 15, 2024
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.
CR passed ✅
QA not done (at least not yet)
MrFlashAccount
commented
May 15, 2024
Frizi
approved these changes
May 15, 2024
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.
Approving the vite config modification.
MrFlashAccount
force-pushed
the
wip/sergeigarin/fix-broken-login
branch
from
May 17, 2024 14:26
9ff5dbe
to
eb67ba4
Compare
@somebody1234 awaiting QA |
PabloBuchu
approved these changes
May 22, 2024
QA 🟢 |
limit the port range with single one Make ENSO_CLOUD_REDIRECT optional, use window.location.origin by default
MrFlashAccount
force-pushed
the
wip/sergeigarin/fix-broken-login
branch
from
May 22, 2024 13:13
62474b4
to
523ccfb
Compare
MrFlashAccount
added
the
CI: Ready to merge
This PR is eligible for automatic merge
label
May 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
--bug
Type: bug
CI: No changelog needed
Do not require a changelog entry for this PR.
CI: Ready to merge
This PR is eligible for automatic merge
g-dashboard
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
Tl;dr
Closes: enso-org/cloud-v2#1231
This PR makes the ENSO_CLOUD_REDIRECT env variable optional and uses window.location.origin as a redirect url by default
Context:
In the recent PR we have changed the server address where we start the electron app from 'http' to 'https'. This change was caused by the Stripe live mode that doesn't work in the HTTP environment. But now we have different origins based on where we launched the app. So we decided to make the ENSO_CLOUD_REDIRECT env variable optional and use window.location.origin as a redirect URL by default. Also, we found a bug if the electron server started on a different port, let's say 8081(this might happen if 8080 is already in use) and the server will be implicitly redirected from 8081 to 8080 after login. We decided to explicitly kill the app and show the error in the console. This is because we need to specify allowed redirect URLs in COGNITO explicitly to make the login flow work.
This Change:
Test Plan:
Go over how you plan to test it. Your test plan should be more thorough the riskier the change is. For major changes, I like to describe how I E2E tested it and will monitor the rollout.
Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.