Skip to content

bug(commands): can not log out correctly with cy.logout() #20

@molchiro

Description

@molchiro

It helps me a lot to test the firebase project. Thanks.

But, cy.logout() don't run correctly.

In logout command, you use 'firebase.auth().currentUser'.
The official document says currentUser might also be null because the auth object has not finished initializing.
https://firebase.google.com/docs/auth/web/manage-users?hl=en#get_the_currently_signed-in_user

So, it is better to use onAuthStateChanged method, as your login command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions