msgphp / symfony-demo-app

A Symfony demo application with basic user management
https://github.com/msgphp/msgphp
MIT License
0 stars 0 forks source link

Separate Oauth registration from regular flow #56

Closed ro0NL closed 3 years ago

ro0NL commented 6 years ago

https://github.com/msgphp/symfony-demo-app/blob/master/src/Security/OauthUserProvider.php#L59

after connecting with oauth a regular CreateUserCommand is dispatched:

https://github.com/msgphp/symfony-demo-app/blob/22484ca051129340c0ff94e5f1d6479d649708ec/src/Security/OauthUserProvider.php#L59-L64

which will dispatch UserCreatedEvent, send an email (event subscribers), etc. The context (oauth / regular) needs to be clear, so we can act accordingly (send the mail yes/no). Perhaps a special command is needed..

relates to #27