joelbutcher / socialstream

OAuth for Laravel, simplified.
https://docs.socialstream.dev
MIT License
433 stars 66 forks source link

Fixes - Changing email after signing in with a connected account renders account not accessible #350

Closed mystyq closed 7 months ago

mystyq commented 7 months ago

Stack

Jetstream – Vue with Inertia

Package Version

^6.0

Laravel Version

v11.0.3

Livewire Version

No response

react Version

No response

Vue Version

No response

PHP Version

8.3.4

Problem description

After connecting a 3rd party account (by same email) and logging in then changing the email, the account can no longer be accessed by that connected account (because the emails are different)

Expected behavior

Logging in with the connected account should find the associated user (no need to check for the email again)

Steps to reproduce

  1. Create account normally
  2. Connected 3rd party account with same email
  3. Change email in profile view
  4. Log out
  5. Sign in with 3rd party account

Reproduction repository

https://github.com/mystyq/socialstream

Relevant log output

Please check the commit to see a suggested solution.  There is a commit message to note that this suggestion is not a complete solution but rather opens up another question as to how to perceive a connected account (basically as a passport to the jetstream account itself)
mystyq commented 7 months ago

Please let me know if you would like me to submit a pull request for this issue. I have applied some fixes to the repository in a few commits. Thanks!