Skip to content

Feature/595b-Ensuring that users have a username, closes #752#752

Merged
55 merged 25 commits intodevelopfrom
feature/595b-ensure-Username
Jan 15, 2016
Merged

Feature/595b-Ensuring that users have a username, closes #752#752
55 merged 25 commits intodevelopfrom
feature/595b-ensure-Username

Conversation

@sebbel
Copy link
Copy Markdown
Contributor

@sebbel sebbel commented Jan 6, 2016

  • Added a Field to Signup and Login to supply a username
  • The username is a required field
  • Cannot choose a username that already exists
  • User can login with username or email

- Added a Field to Signup and Login to supply a username
- The username is a required field
- Cannot choose a username that already exists
- User can login with username or email
@sebbel sebbel changed the title Ensuring that users have a username feature/595b-Ensuring that users have a username Jan 6, 2016
@sebbel sebbel changed the title feature/595b-Ensuring that users have a username Feature/595b-Ensuring that users have a username Jan 6, 2016
@sebbel
Copy link
Copy Markdown
Contributor Author

sebbel commented Jan 6, 2016

@apinf/developers please review

@sebbel
Copy link
Copy Markdown
Contributor Author

sebbel commented Jan 7, 2016

Just tested on a local instance, the Profile Template is using the Meteor.user.username field.
Now just thinking how I could wire a sAlert in there. I am thinking of defining it on the profile.js file to just check for absence of Meteor.user.username

@brylie brylie self-assigned this Jan 7, 2016
@brylie
Copy link
Copy Markdown
Contributor

brylie commented Jan 7, 2016

@sebbel I have encountered a bug, and am not sure the work-to around. When registering via Github, with a Github account that has the same username (e.g. sebbel) as an existing Apinf account (e.g. sebbel), I get the error: "username already exists".

In the case of the Github registration, we somehow need to get the username after the Github registration/user creation happens.

@brylie
Copy link
Copy Markdown
Contributor

brylie commented Jan 7, 2016

It also might be possible to allow users to log in without a username. Then, the Github login could complete, and the user would be prompted to create a username.

@sebbel
Copy link
Copy Markdown
Contributor Author

sebbel commented Jan 7, 2016

Thanks for your feedback. I haven't tested the GitHub authentication but
there might be a way to let github users pass registration with an empty
username. the redirect would take place in that case.

Am Donnerstag, 7. Januar 2016 schrieb Brylie Christopher Oxley :

It also might be possible to allow users to log in without a username.
Then, the Github login could complete, and the user would be prompted to
create a username.


Reply to this email directly or view it on GitHub
https://github.com/apinf/api-umbrella-dashboard/pull/752#issuecomment-169660028
.

@brylie
Copy link
Copy Markdown
Contributor

brylie commented Jan 7, 2016

Good idea. Lets try that out.

@jykae
Copy link
Copy Markdown
Contributor

jykae commented Jan 8, 2016

@sebbel @brylie I am taking a look at this one.

@jykae jykae self-assigned this Jan 8, 2016
@brylie brylie added this to the Sprint 20 milestone Jan 8, 2016
@jykae
Copy link
Copy Markdown
Contributor

jykae commented Jan 8, 2016

@apinf/developers please review

@brylie
Copy link
Copy Markdown
Contributor

brylie commented Jan 11, 2016

@bajiat , @jykae and I worked on this last week, so it might be good for another of the @apinf/developers to review this PR.

@jykae
Copy link
Copy Markdown
Contributor

jykae commented Jan 11, 2016

Line 7 in profile.js: "return sAlert.error(error);" is causing "Uncaught TypeError: Converting circular structure to JSON". Trying to find out how to fix it.

@jykae
Copy link
Copy Markdown
Contributor

jykae commented Jan 12, 2016

I fixed what I could, please review.

@jykae jykae changed the title Feature/595b-Ensuring that users have a username Feature/595b-Ensuring that users have a username, closes #752 Jan 12, 2016
@brylie
Copy link
Copy Markdown
Contributor

brylie commented Jan 12, 2016

@elnzv please review 🔜

@55
Copy link
Copy Markdown
Contributor

55 commented Jan 12, 2016

When setting an username at /profile if it exists, no error message is showing.

595-no-error-showing

@brylie
Copy link
Copy Markdown
Contributor

brylie commented Jan 13, 2016

OK, we have to figure out some way to send a simple message back to AutoForm saying the username exists. That MongoDB error will not suffice, and the error will ideally appear directly below the username field.

The AutoForm onError callback was removed, but may be the right place for a fix here.

@bajiat bajiat assigned brylie and unassigned 55 Jan 14, 2016
@bajiat
Copy link
Copy Markdown
Contributor

bajiat commented Jan 14, 2016

Pass the following error to the user: "User name already exists. Enter another user name."

@sebbel
Copy link
Copy Markdown
Contributor Author

sebbel commented Jan 14, 2016

Please review @apinf/developers
@elnzv or @brylie I would be happy if you could connect the new /both/collections/_messages file to the translations file. I have added a comment in the _messages file and already the entry for the i8en but I am unsure why the translation is not working on my end.

@brylie
Copy link
Copy Markdown
Contributor

brylie commented Jan 15, 2016

@sebbel thanks! 👍 This is perfect.

@brylie
Copy link
Copy Markdown
Contributor

brylie commented Jan 15, 2016

I opened a support request about translating custom validation texts:
Meteor-Community-Packages/meteor-simple-schema#534

@brylie
Copy link
Copy Markdown
Contributor

brylie commented Jan 15, 2016

We can merge this PR, as full translation capabilities are not required for PoC.

@brylie
Copy link
Copy Markdown
Contributor

brylie commented Jan 15, 2016

OK, I moved the i18n folder into lib, so that it would load before other code. This enables us to use i18n strings in validation messages. Cheers!

@brylie
Copy link
Copy Markdown
Contributor

brylie commented Jan 15, 2016

I have also merged changes from develop to resolve conflicts.

@brylie
Copy link
Copy Markdown
Contributor

brylie commented Jan 15, 2016

@apinf/developers please review once more, and merge if possible.

55 pushed a commit that referenced this pull request Jan 15, 2016
Feature/595b-Ensuring that users have a username, closes #752
@55 55 merged commit d45790d into develop Jan 15, 2016
@55 55 deleted the feature/595b-ensure-Username branch January 15, 2016 10:44
@55 55 removed the in progress label Jan 15, 2016
@brylie brylie mentioned this pull request Jan 19, 2016
6 tasks
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.

5 participants