Closed daranguiz closed 7 years ago
This will probably be useful: http://blog.miguelgrinberg.com/post/oauth-authentication-with-flask
OAuth is done, now two things left before closing this issue:
If you do let users change usernames, be sure to include something that does not change in their user table or something, some sort or UUID.
One way that I think is a nice way to do it is have username be an email address, which ensures uniqueness for you externally, and then let users give themselves a nickname, which you can also enforce is unique across the site. Then, nicknames are easy to change, and usernames do not change (as often).
https://github.com/daranguiz/barbell-io/blob/master/app/models.py
I'm sort of already doing that?
All enforced to be unique.
Anyway, I'm not sure the best way to do this. For relationships in the DB (user -> lift entries, at some point user -> user social following stuff), I'm planning on using the ID. To check if it's a new user, I'm comparing against the UID. Maybe it would be better to compare against the email.
sgtm
Forgot to close w/commit, but, done
You should reference the specific commit that closes the issue when you do this
Didn't know the right way to do this
25fd9c2aace404a293495b9cb44836f35dd56570
The tutorial I was using at the beginning ran OpenID, but that protocol is wildly out of date. At minimum, allow for authentication via Google and Facebook.
Also allow users to select their own username if logging into the site for the first time rather than autogenerating from their OAuth data.