erikras / erikras/react-redux-universal-hot-example

How to include JWT authentication in the middleware

Open
#608 57 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
12.1k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to include JWT ( http://jwt.io/ ) token authentication in the boilerplate.
Let's pretend for a second that the autentication process serverside is already there.
What I do is calling API/login passing username and password and I return a token. From that point on, I'd like the middleware to attach this to every http calls.

```
headers: {
'Authorization': `Bearer *TOKEN* `
}
```

Where _TOKEN_ is this.store.token variable defined in the redux auth.js.

How can I do that ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.