Skip to content

_authHandler calls undefined function this._setUser #128

@alignedfibers

Description

@alignedfibers

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions