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

React Hook for Token Auth #1566

Open joynerd opened 1 year ago

joynerd commented 1 year ago

I wrote the following to make fetch work well with this library using react:

https://gist.github.com/joynerd/f0b386c6d25647ec7c4839cd60024e54

I wanted to double check that I am accessing the auth endpoints correctly, but I also thought others would find this useful.