D
D
Denis Bukreev2018-08-17 10:52:33
Vue.js
Denis Bukreev, 2018-08-17 10:52:33

How to work with JWT in VueJS (+ Laravel)?

After registering or logging in, the backend sends me this JSON:

{
access_token : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91cGxpZnkubG9jXC9hcGlcL2F1dGhcL3JlZ2lzdGVyIiwiaWF0IjoxNTM0NDkyMTE1LCJleHAiOjE1MzQ0OTU3MTUsIm5iZiI6MTUzNDQ5MjExNSwianRpIjoiMEx4VDA2eHo3bUlzd2p2MSIsInN1YiI6NCwicHJ2IjoiMGYwZWUyNTI0NTA0MGI3MTBkNTdhZmVjZDIxYTQyNDcyYWZiYzlhYSJ9.ZmnMvUIGTK5Y25-BmarkUI0chkZWhrvIjRbDmAu7QGk"
expires_in : 3600
token_type : "bearer"
}

Where and how to save this token correctly, and what to do with expires_in and token_type?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Kovalchuk, 2018-08-17
@denisbookreev

Must be added to the header of each request
It is described in detail here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question