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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signup loop after entering invalid display name #13

Open
embeepea opened this issue Sep 1, 2020 · 0 comments
Open

signup loop after entering invalid display name #13

embeepea opened this issue Sep 1, 2020 · 0 comments

Comments

@embeepea
Copy link
Member

embeepea commented Sep 1, 2020

User gets stuck in infinite loop of Display Name -> Terms -> Display Name -> ... after entering an invalid display name.

To repro:

  1. browse to '/e/' in a new session (not logged in), get oauth "Sign in with Google" page, go thru Google sign in steps with account not previously registered with editor
  2. see "Display Name" page, enter a display name that contains an invalid character such as a period ; click "Sign Up" button
  3. see "Display Name" page again, with error message about invalid display name. Enter a valid display name this time, and click "Sign Up" button again
  4. see Terms page, click 2 agree checkboxes, click "Continue" button
  5. see Display Name page again, with the valid name you entered in step 3 pre-populated in the Display Name text box. Clicking "Sign Up" button leads back to the Terms page and an infinite loop between steps 4 & 5.
  6. If you skip step 2 (entering invalid display name), everything works fine -- no infinite loop.

I've traced the difference between the successful flow (omitting step 2) and the buggy flow (including step 2) to the following line in the code:

https://github.com/kartta-labs/editor-website/blob/master/app/controllers/users_controller.rb#L72

In the buggy flow, after that line new_user.email is empty, whereas in the successful flow it contains the user's email address. Maybe there's some bad interaction between the 2nd rendering of the display name page (with error message) and the oauth data in the session / headers?...

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

No branches or pull requests

1 participant