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

Feature/login with google #8

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Conversation

darko-mijic
Copy link
Member

No description provided.

@@ -8,7 +8,8 @@ Space.messaging.Controller.extend(Space.accountsUi, 'LoginController', {
eventSubscriptions() {
return [{
'Space.accountsUi.LoginRequested': this._onLoginRequested,
'Space.accountsUi.LogoutRequested': this._onLogoutRequested
'Space.accountsUi.LogoutRequested': this._onLogoutRequested,
'Space.accountsUi.LoginWithGoogleRequested': this._onLoginWithGoogleRequested,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather keep a single LoginRequested event and use something like a service property to distinguish between the various strategies. Same for the failed / succeeded events!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two concerns with that. Login and account creation are one if the user is logging in with external OAUTH service, and events have different properties.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But there should be one LoginWithServiceRequested event for all services or the solution with one event as you are suggesting.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok then only unify the failure / success events? My concern here is that subscribers need too much detail about the login process otherwise. Imagine you allow login with all different service providers. Then you would need 6 different event handlers although the basic flow (showing errors / login successful) is always the same 😉

@darko-mijic darko-mijic self-assigned this Jan 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants