Skip to content

angular-devise Auth not working until page refresh #117

@Sharespot

Description

@Sharespot

I'm using angular-devise and I have the following service that checks whether the user is logged or not

    isAuthenticated: function ($state, Auth) {

        Auth.currentUser().then(function (){
            console.log("user is logged");
        }, function(error) {
            $state.go('home',{});
            console.log("user is not logged");
        })

The problem is when I log the user on the server side it keeps returning that he's not logged in until I refresh the page. Then, after the refersh, it says that the user is logged as expected.

What am I missing here? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions