Skip to content

Implement Social Authentication#27

Open
MohannadNaj wants to merge 6 commits intosaudi-tech-groups:masterfrom
mohannadnaj-forks:socialAuth
Open

Implement Social Authentication#27
MohannadNaj wants to merge 6 commits intosaudi-tech-groups:masterfrom
mohannadnaj-forks:socialAuth

Conversation

@MohannadNaj
Copy link
Copy Markdown
Contributor

@MohannadNaj MohannadNaj commented Jun 23, 2018

This PR is related to the issue #2

It's totally understandable if this PR got closed without merging because social authentication is not planned to be in the first release, or if you have a different approach for implementing it.

for a quick look to the logic behind this, check out the tests file

Note 1:

Only login with [Google, Github, Twitter] or Register and login with [Google, Github, Twitter]?

There is two scenarios:

1- The user have to and must register normally, then from some inner page, the user can link social accounts. This case, it's Only Login with [Google, Github, Twitter]

2- The user can skip the normal registration and Register using [Google, Github, Twitter]. Although, the user has the ability to use the normal registration and link the accounts later. This case, it's Register and Login with [Google, Github, Twitter]

This PR is working under the assumption that it's the second case, Register and Login with [Google, Github, Twitter].

However, a problem will arise here, if the user registered with any of the social services, the user will have a random 40 character password, this implementation will flag this case by setting the newly added column to users table need_password_update to true.

Note 2:

This PR is under the assumption that one user can link multiple social accounts and use any of them to login. There is websites allows only one linked social account, so if I logged in using Twitter, I'll be in a different account than if I logged in using Google.

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.

1 participant