Skip to content
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

Using email as auth identity is unreliable #38

Open
pixobit opened this issue May 16, 2023 · 2 comments
Open

Using email as auth identity is unreliable #38

pixobit opened this issue May 16, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@pixobit
Copy link

pixobit commented May 16, 2023

PHP Version

8.1

CodeIgniter4 Version

4.3.2

Shield Version

1.0.0-beta.3

Shield OAuth Version?

dev-develop

Which operating systems have you tested for this bug?

Windows

Which server did you use?

apache

Database

MySQL 5.6

Did you add customize OAuth?

YES.
It's not public

What happened?

When signing in with google or github, using the email as authentication identity is fine, but when you add facebook for example, it already breaks, since facebook doesnt always have an email available. A more reliable way would be to use the id, and only pull the email if available

Steps to Reproduce

Use the facebook OAuth available in the discussions, and try signing in with a fb account where you used phone number to sign in

Expected Output

To be able to sign in without unexpected error

Anything else?

I hope i managed to make it as clear as possible, but if not, let me know, and will try to add some sources for explanation

@pixobit pixobit added the bug Something isn't working label May 16, 2023
@datamweb datamweb added the good first issue Good for newcomers label May 16, 2023
@JamesShaver
Copy link

I'm curious if there's been any thought about how to get around this issue? Would it be as simple as changing the Shield Login Identifier to phone?

@Zoly
Copy link
Contributor

Zoly commented Jul 22, 2024

How about validated attached authentication accounts?

The user is logged in and in his user profile page he can choose to add additional authentication accounts.
After validating that he owns the newly requested account, the two login identifiers are linked, and whichever login method he chooses later on, both are identified as the same account.

In case the requested account is already in existence, by passing the validation process it is confirmed we are dealing with the same user and the two login identifiers can be safely be merged into one account, specifically the account he made the requested from, after notifying the user of the fact that he will loose access to the personalized settings that can't be merged in the account he tries to attach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants