svrcekmichal / redux-axios-middleware

Redux middleware for fetching data with axios HTTP client
MIT License
918 stars 96 forks source link

How to use authentication headers? #12

Closed iyn closed 8 years ago

iyn commented 8 years ago

First of all: thank you for creating this middleware!

Let's say I have a JWT token stored in the redux tree (fetched/generated on the login) that is needed for certain request to succeed - is it possible to somehow pass/use the token with this middleware?

svrcekmichal commented 8 years ago

Yes, you can use implemented axios interceptors. Look at first @nmaves 's comment in #8