Skip to content

Conversation

@edeuxk
Copy link

@edeuxk edeuxk commented Jan 15, 2020

Description of what you did:

Issue: https://github.com/strapi/strapi/issues/4998

So I've replaced the facebook callback username by user.name + user.id.
It prevent new users with an already known name to be blocked as registration using Facebook Auth.

Since you only use the user email to find a user, it won't give any bugs or incorrect login attempts in the future
https://github.com/strapi/strapi/blob/master/packages/strapi-plugin-users-permissions/services/Providers.js#L44
const users = await strapi.query('user', 'users-permissions').find({ email: profile.email, });

My PR is a:

  • 💥 Breaking change
  • 🐛 Bug fix
  • 💅 Enhancement
  • 🚀 New feature

Main update on the:

  • Admin
  • Documentation
  • Framework
  • Plugin

Manual testing done on the following databases:

  • Not applicable
  • MongoDB
  • MySQL
  • Postgres
  • SQLite

@derrickmehaffy
Copy link
Member

@edeuxk can you please use the PR template, and provide a descriptive title? There are parts of the template that are used to automatically generate the change logs for releases

@edeuxk edeuxk changed the title Update Providers.js Update Providers.js for Facebook Auth to prevent new user to be blocked on registration Jan 15, 2020
@alexandrebodin
Copy link
Member

HI @edeuxk, Thank you for your contribution. I'm closing this PR as we discussed in the associated issue for now.
Once we assess the required work we will be able to accept PRs

@edeuxk edeuxk deleted the patch-1 branch January 17, 2020 09:05
@derrickmehaffy
Copy link
Member

This pull request has been mentioned on Strapi Community. There might be relevant details there:

https://forum.strapi.io/t/global-authenticate-issue-facebook-google-local-provider-4998/1453/2

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