joelbutcher / socialstream

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

[5.x] Improve authentication & account registering logic #318

Closed miguilimzero closed 11 months ago

miguilimzero commented 11 months ago

This pull request improves the new account registration handling. The current code has a duplicate code to handle that, and the logic gets slightly confusing.

Here is an example. Let's consider the flag hasCreateAccountOnFirstLoginFeatures is enabled:

Current version:

With the code refactoring, the first code snippet will handle every route case if the "create account from login" flag is enabled (not only login) and the second code snipped is removed. We are preserving the exact same logic here.

miguilimzero commented 11 months ago

@joelbutcher Sorry, but I could not find a relation between this feature flag and the multiple stacks available. I made the following changes:

joelbutcher commented 11 months ago

Released v5.3.2 with this fix included, sorry for the slowness here – thanks for your work!