-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[server] Redirect without hitting sorry endpoint. #5568
Conversation
@JanKoehnlein This does affect what the user sees, but I'm not sure if this should go into Changelog? |
@laushinka If in doubt, put it into changelog |
Looking at this now! 👀 |
/werft run 👍 started the job as gitpod-build-laushinka-gitlab-tos-5183.8 |
Seems not exactly to touch this PR, but anyways: Does it perhaps make sense to make it clearer in the error message that it is the GitLab ToS and not the Gitpod ToS? Could imagine that this is easy to read over. 🤔 |
@corneliusludmann Yes that totally makes sense! |
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.
UX looks great, @laushinka! Much better than hitting an error page. 🔮
However, I agree with what @corneliusludmann mentioned in #5568 (comment) about the message clarity. This could also follow the voice and tone used in other error messages we show up there like in #3950. ❗
Feel free to open a follow up issue or PR for improving that message. 🏓
🍊 🍊 🍊 🍊
I'd suggest to rephrase from:
Error: 403 Forbidden - You (
@username
) must accept the Terms of Service in order to perform this action. Please access GitLab from a web browser to accept these terms.
To:
The selected provider has updated their Terms of Service. Please, visit the provider to review and accept the terms before using @username to login in Gitpod.
BEFORE | AFTER |
---|---|
if (!UnconfirmedUserException.is(err)) { | ||
// user did not accept ToS. Don't count this towards the error burn rate. | ||
increaseLoginCounter("failed", this.host); | ||
if (UnconfirmedUserException.is(err)) { |
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.
praise: Short and sweet!
LGTM label has been added. Git tree hash: c13e2c180fdddd9a8975f66caa208db42cb1fbb6
|
@gtsiolis Much better text! Will do the change :) Should we make it specific to GitLab? i.e. "GitLab has updated their..." I think this error only happens with them. But generic also works so I don't have strong feelings either way. |
Hey @laushinka! In the scope of this PR and #5183, making it specific to GitLab could suffice. Your call! 📞
That's correct! 🍋 🍋 🍋 🍋 However, keep in mind that:
This means that:
|
@gtsiolis Ahh, that makes sense. |
Wait I actually can't find where this string comes from. @corneliusludmann do you know where the 403 error message comes from? Is it a response from GitLab? |
@gtsiolis @corneliusludmann Yes from GitLab: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/auth/user_access_denied_reason.rb#L17 |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gtsiolis, JanKoehnlein Associated issue: #5183 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #5183
Description
When an unauthorized GitLab user logs into Gitpod, we used to handle that by redirecting to /sorry. However, GitLab doesn't clearly show this to the user, and the user doesn't know that they have an incomplete auth process.
Now we redirect to the frontend and show the error message, so that the user will know that they should complete the auth process on GitLab.
Related Issue(s)
Fixes #5183
How to test
Same as how @AlexTugarev described the reproduction steps here:
Release Notes