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

_authHandler called twice during login #67

Merged
merged 1 commit into from
Jan 20, 2016

Conversation

honzalo
Copy link
Contributor

@honzalo honzalo commented Sep 24, 2015

The _authHandler function is being called twice whenever the login function is called (and succeeded). The _loginHandler is the callback function for all of the 'auth functions', when run and without error calls the _authHandler. At the same time, the onAuth firebase function (set on the _locationChanged function) will call the _authHandle whenever the authorization changes the state. For this reason, _authHandler on a valid login is being called twice and thus the 'login' event fired twice.

There is no need for the _loginHandler function (callback of the login function) to be run on succeed as the _authHandler function was already set up on the onAuth firebase function and will be called when the login is performed and the authorization changes of state.

…ing called by the onAuth firebase function when the user state changes
@MeTaNoV
Copy link
Contributor

MeTaNoV commented Nov 28, 2015

agreed, this cause the 'login' to be fired twice...

@addyosmani @mbleigh

can this be fixed?

@chuckh
Copy link
Contributor

chuckh commented Jan 20, 2016

LGTM. @cdata PTAL.

@ebidel
Copy link
Contributor

ebidel commented Jan 20, 2016

LGTM

ebidel added a commit that referenced this pull request Jan 20, 2016
_authHandler called twice during login
@ebidel ebidel merged commit 37d1f69 into GoogleWebComponents:master Jan 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants