Skip to content

Update passport auth api #1062

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

Merged
merged 2 commits into from
Jul 15, 2015

Conversation

adamk33n3r
Copy link
Contributor

There have been some API changes.

As of July 8th Facebook introduced v2.4 of their API. The default request only responds with id and name now.
If you create a Facebook app after July 8th you are forced to use v2.4 so this breaks the app (even though passport is currently defaulted to use v2.2, Facebook forces you).

Google has deprecated the use of https://www.googleapis.com/auth/userinfo.profile and https://www.googleapis.com/auth/userinfo.email. You should now use profile and email.

Facebook removed most default info. Must now explicitly ask for email.
They also do not send usernames anymore.
The following scopes are no longer supported:
  - https://www.googleapis.com/auth/userinfo.profile
  - https://www.googleapis.com/auth/userinfo.email
Use the following in place
  - profile
  - email

Passport also does not provide the username, but we can get it from the email.
@kingcody
Copy link
Member

@adamk33n3r thank you very much.

Awk34 added a commit that referenced this pull request Jul 15, 2015
@Awk34 Awk34 merged commit ceb9c64 into angular-fullstack:canary Jul 15, 2015
@adamk33n3r
Copy link
Contributor Author

@kingcody you're welcome. I'm glad to provide value to something I love using.

@Awk34
Copy link
Member

Awk34 commented Jul 15, 2015

Thanks @adamk33n3r . Feel free to continue to open PRs :D

Also feel free to contact me on Gitter.im

@kingcody
Copy link
Member

So guys, I'm wondering if we should remove the username field from the passport strategies. Its not saved into the database and is not consistent across providers.

Also, what is the current situation of a user signing in with twitter? Since we don't get an email address does our user registration fail with model validation errors?

@adamk33n3r
Copy link
Contributor Author

@kingcody I can confirm Twitter still works. If you look at https://github.com/DaftMonk/generator-angular-fullstack/blob/canary/app/templates/server/api/user(auth)/user.model(mongooseModels).js#L59 it returns true is you are using an oauth provider, no matter if email is set or not.

@Awk34
Copy link
Member

Awk34 commented Jul 15, 2015

I'll chat you guys on Gitter

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.

3 participants