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

Auth.currentUser() sending nothing to server on refresh #83

Open
Veske opened this issue Jan 6, 2016 · 5 comments
Open

Auth.currentUser() sending nothing to server on refresh #83

Veske opened this issue Jan 6, 2016 · 5 comments

Comments

@Veske
Copy link

Veske commented Jan 6, 2016

So in my app when I do a login with angular-devise, the user gets logged in with no problems. But once I do a reload, the application will get a unauthorized response from server because Auth.currentUser() sends nothing to the server.

How can I fix this?

@FredHasselot
Copy link

Same issue for me.

@HarlemSquirrel
Copy link

I have noticed this problem as well on my app found here: https://github.com/HarlemSquirrel/eWorm/tree/angular-single-page-app

@HarlemSquirrel
Copy link

Actually, I just did some playing around and the problem for me seemed to be with Auth.isAuthenticated() which doesn't doesn't work on refresh until I call Auth.currentUser() and then it works fine.

@Sergezdv
Copy link

Sergezdv commented Nov 30, 2016

Same issue for me.
This occurs when the server for sign in/up uses the https protocol, *for http everything works well ... I suspect that the case in the status response:
201 Created for http
and for https - two cases:

  1. in the first (default) used 2 reqests: 1) trying POST at http - receives 302 Found -> then 2nd GET at https and receives 304 Not Modified

  2. if Base URL Is set for use https, then the one request but received 401 , current_user no saved

@Austin-Qu
Copy link

Same issue for me.

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

5 participants