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

No way to see / parse the server response from logout #121

Open
MPM10223 opened this issue May 26, 2018 · 0 comments
Open

No way to see / parse the server response from logout #121

MPM10223 opened this issue May 26, 2018 · 0 comments

Comments

@MPM10223
Copy link

I'm running into a CSRF issue using Auth in an SPA. If a user logs in, then logs out, and then tries to log back in, the CSRF token needs to be renewed from the server. Typically Rails does this for you automatically in a page refresh, but since I have an SPA, I need to do this manually. Per https://stackoverflow.com/questions/11845500/rails-devise-authentication-csrf-issue# I was hoping to have my logout (DELETE) endpoint return the new CSRF token and store it in the HTML, but the promise of Auth.logout only gives me the old user object and doesn't give me visibility to the server's response from the DELETE.

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