[Answered ]-Request.user is Anonymous even after login in Angularjs , django-tastypie

2👍

If you are using standard Authentication which means “no authentication at all”, the method is_authenticated doesn’t check or assign user to request. So user bundle.request.user will be anonymous in this particular resource. I see you have signed request up in login resource. So guessing you will have to use SessionAuthenctication or generate api_key in login. And use that in MessageResource as ApiKeyAuthentication or other.

You should see how is_authenticated works for each authentication method:
Authentication
BasicAuthentication
ApiKeyAuthentication
SessionAuthentication

Note response: Redirect is not related here.

Leave a comment