Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

Need username and email from OAuth2 API #118

Closed
toolness opened this issue Apr 2, 2015 · 6 comments
Closed

Need username and email from OAuth2 API #118

toolness opened this issue Apr 2, 2015 · 6 comments
Assignees

Comments

@toolness
Copy link
Contributor

toolness commented Apr 2, 2015

In order to fully replace the existing Persona login, id.webmaker.org needs to provide a user's email and username to an authenticated client.

The need for the username is obvious and shouldn't impact user privacy.

The email, however, does impact privacy, and is needed for the transactional emails that teach-api sends out. That said, the email won't be shared with the front-end code that runs in the browser.

This information can either be provided through an OAuth2 call with a bearer token, or it can be provided in the info blob that is returned from /login/oauth/access_token, which is what Twitter does (albeit not with the email address, just the username).

@toolness toolness changed the title Need username and password from OAuth2 API Need username and email from OAuth2 API Apr 2, 2015
@toolness
Copy link
Contributor Author

toolness commented Apr 2, 2015

Oops lol typo in the original issue title.

@toolness
Copy link
Contributor Author

toolness commented Apr 2, 2015

Note that simply documenting this API will help unblock mozilla/teach-api#11, so if it's faster for you to first document and implement later, that's cool too.

@jbuck
Copy link
Member

jbuck commented Apr 2, 2015

Agreed, I think we need to add this to id.wm.o for now. I propose the following:

  1. Document a new scope called "email", which allows the client application to access the email
  2. Create a new route GET /user which checks the scopes on the oauth token, fetches information from login.wm.o, and returns user information based on the scopes. Akin to https://developer.github.com/v3/users/#get-the-authenticated-user

@toolness that sound right?

@jbuck
Copy link
Member

jbuck commented Apr 2, 2015

@cadecairos do you have time to implement this addition?

@toolness
Copy link
Contributor Author

toolness commented Apr 2, 2015

Yeah that sounds great to me @jbuck! Thanks. If you can document that in as detailed a way as you do the rest of the calls in docs/oauth.md I can start implementing my side of it asap!

@secretrobotron secretrobotron added this to the Teach QA and Launch milestone Apr 2, 2015
@cadecairos
Copy link
Contributor

Fixed by #128

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

No branches or pull requests

4 participants