Need to logout of accounts when request is AJAX
jpslav opened this issue · 2 comments
jpslav commented
When someone logs out of a product site, we have code to log that also logs them out of Accounts
This code works by redirecting to Account's logout action, which in turn redirects back to the root of the referrer:
https://github.com/openstax/accounts/blob/master/app/controllers/sessions_controller.rb#L35-L41
This is all fine for normal Rails views, but the redirect doesn't work for javascript requests. Can it be made to? (or do we need to require JS clients to send a non AJAX logout request?)
Dantemss commented
I think this can be solved by making the tutor logout be a GET like Phil wants for other reasons... I'll try it.
Dantemss commented
This was solved by allowing logout via GET