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

angular-devise Auth not working until page refresh #117

Open
Sharespot opened this issue Oct 21, 2016 · 0 comments
Open

angular-devise Auth not working until page refresh #117

Sharespot opened this issue Oct 21, 2016 · 0 comments

Comments

@Sharespot
Copy link

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!

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