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

OAuth signup form tweaks #244

Merged
merged 11 commits into from Jan 16, 2020
Merged

OAuth signup form tweaks #244

merged 11 commits into from Jan 16, 2020

Conversation

thebaer
Copy link
Member

@thebaer thebaer commented Jan 16, 2020

This fixes / adds a few things during OAuth signup (see commits for more notes):

  • Reserve the username "oauth"
  • Generate non-colliding usernames in all lowercase
  • Fix false login state on OAuth signup page
  • Add comments for future refactoring

Including changes designed to reduce friction during the signup process:

  • Add async username check on OAuth signup form
  • Fall back to the given username as the "Display Name" (collection title) if none given during signup
  • Remove Password field / requirement from OAuth signup page, to eliminate a bit of friction. Resolves T715

All usernames should be lowercase, so this generates any username suffix
(in cases of collision) with only lowercase letters. It also removes
vowels to prevent bad 5-letter words from forming.

Ref T712
This checks the user's inputted username as they type it, and prevents
form submission if the name is taken.

Ref T712
Having a `Username` field populated in the page data tells the base
template to display navigation that only a logged in user should see. So
this renames the field to `LoginUsername`, similar to our login.tmpl
page.

Ref T712
"alias" is the name of a different collection field, so this renames the
variable internally to make things clearer.
This uses the given username as the Display Name / Collection Title if a
user doesn't give one -- as might happen when authenticating with
Write.as.

Ref T712
This makes it possible to complete OAuth signup without creating a
password on the WriteFreely instance.

A user can then add a password to their account through their Account
Settings page without any admin action (all of this logic is already in
place).

Ref T715 T712
This removes a bit of friction.

Ref T715 T712
@thebaer thebaer added this to the 0.12 milestone Jan 16, 2020
Copy link
Collaborator

@ngerakines ngerakines left a comment

Choose a reason for hiding this comment

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

LGTM

@thebaer
Copy link
Member Author

thebaer commented Jan 16, 2020

Thanks!

@thebaer thebaer merged commit b9914dd into develop Jan 16, 2020
@thebaer thebaer deleted the oauth-signup-tweaks branch January 16, 2020 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants