lynndylanhurley / devise_token_auth

Token based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth.
Do What The F*ck You Want To Public License
3.54k stars 1.13k forks source link

🐛 Not update cookies when is a batch request #1577

Closed djpremier closed 1 year ago

djpremier commented 1 year ago

Due to the batch requests approach, when this occurs the header has a blank token for the other requests and with that the current logic invalidates the cookie, as it is automatically updated by the back-end without any control from the client (browser) , for those cases due to ignore any change in them to keep what was received in the last valid request (in theory the first received that was not treated as a batch).

MaicolBen commented 1 year ago

@djpremier can you rebase to make sure tests pass?

djpremier commented 1 year ago

@djpremier can you rebase to make sure tests pass?

Hi Maicol, yes, one a moment.

MaicolBen commented 1 year ago

one spec fails 😞

djpremier commented 1 year ago

Hi @MaicolBen, now all tests work! 🎉

(I suspect it was sprockets fault as it also prevented me from uploading a "clean" project)