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 calls undefined function this._setUser #128

Open
alignedfibers opened this issue May 2, 2016 · 0 comments
Open

_authHandler calls undefined function this._setUser #128

alignedfibers opened this issue May 2, 2016 · 0 comments

Comments

@alignedfibers
Copy link

this.setUser does not exist. It appears that the element property user is to be set to the current authData when successful login completes and null on logout.

I have added the _setUser function and it works. _setUser is only called from _authHandler.

This is a quickfix so I can reference the auth object from firebasAuth.user
I am unsure if this breaks anything but I do not see how it could, unless user
is supplied in the elements attribute property.

Firebase maintains an auth object on the current reference causes me to believe that if mutiple users requires multiple references. Passing in the user object from the element attribute does not appear
possible unless there is already a reference associated with the user. The _setUser function I added to the copy I am using does not account for this and would require a call to logout and re-authentication to switch users. However I would like to maintain a list of auth objects accross multiple references and be able to switch users without re-authentication.

Please advise if the _setUser method is not needed and I am doing somthing wrong.
I could access the auth object directly from the firebase reference instead.

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

No branches or pull requests

1 participant