0

i am using devise in an application, and when a call is made via ajax, and the user has been signed out due to session expiry, devise shows http authentication... is it possible to make it so that it can send a js to let the caller know that the user is logged out...

1 Answer 1

2

Add this code to your Devise initializer file

config.http_authenticatable = false
config.http_authenticatable_on_xhr = false 
Sign up to request clarification or add additional context in comments.

1 Comment

My app has both of those set to false but I'm still getting a 401 after making the ajax call to the log in method. Ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.