-
Notifications
You must be signed in to change notification settings - Fork 80
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
using redux-token-auth to authenticate POST/UPDATE requests to the backend server #34
Comments
This does work out of the box if you use axiom for your HTTP requests, as it sets auth headers in the axiom default headers. |
Thanks for the response, how would you achieve that? Seems odd that I have full support for authentication, but I cannot use the tokens for custom requests. In my app I'm using
I would need to use the authentication token in the Has anyone solved this? How would you do that? Thanks, Giulio |
I found that the
I'm using these as customHeaders in my images uploader:
I don't like too much accessing directly the localStorage to read data that was written there by Triggering I could try to do that manually in a callback, but it's rapidly becoming an ugly monkey patch. any ideas on how to clean that up? |
+1 the axios docs provides a way to assign the access token by default. But the access tokens are changed every request and have to be reconfigured everytime. I'd love if it provides a wrapper around axios API whereby we could make secure authorizable requests...some thing like..
If there's a workaround, it would be helpful if a small working snippet is provided as to how to go about this. |
Hey @AmitJoki @DonGiulio how did you end up solving this? Modifying the localStorage manually doesn't seem right to me. |
I may have a very similar issue here, using |
Hello,
Probably there's something I'm missing, I think this package should provide a way to authenticate requests to the backend in order to use the stored tokens also for any backend calls, other than just user registration/authorization purposes.
My backend has several API calls that require authentication to protect private user data, or to limit updates to the legitimate users.
I believe the client should allow to:
I'm not seeing code for doing anything like this in here.
How would you make sure that only authenticated users can perform certain actions on the backend?
Thanks
The text was updated successfully, but these errors were encountered: