Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENG-2002] redirect user who is already registered #9450

Closed

Conversation

Johnetordoff
Copy link
Contributor

@Johnetordoff Johnetordoff commented Jul 29, 2020

Purpose

Orcid sign on causing "bad token" sentry errors, I believe this is because the email_verifications is cleared when the user registers, so users attempting to register twice (knowingly do to button mashings or unknowingly due to email spam checking) have no token in email_verifications hence the error.

Changes

  • prevented clicking the link multiple times from leading to a bad request error.

QA Notes

No Migration, low risk

To reproduce replicate steps 1, 3 and 4 from this doc: https://docs.google.com/document/d/1wCk_nHQKCVozGk0j0UrU2VFWiF6Qk4qsIYaDzNezjvU/edit

Documentation

馃悶 fix, no docs.

Side Effects

None that I know of.

Ticket

https://openscience.atlassian.net/browse/ENG-2002

@Johnetordoff Johnetordoff changed the title [WIP][ENG-2002] redirect user who is already registered [ENG-2002] redirect user who is already registered Jul 30, 2020
Copy link
Contributor

@corbinSanders corbinSanders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for this improvement!

Copy link
Collaborator

@brianjgeiger brianjgeiger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question on an assertion comment.

assert_equal(self.user.email_verifications, {})

res = self.app.get(url, auth=self.auth)
assert_equal(res.status_code, 302, 'redirects to cas logout')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a correct comment? It looks like it's redirecting to the logged in dashboard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it's wrong, it's a good old copy and paste error.

Copy link
Collaborator

@brianjgeiger brianjgeiger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃帀 馃惂 馃帀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants