1. After logging in for the first time, return to the front-end token, and then the front-end takes the token to get the corresponding data
2. When you log in for the second time, you don"t need to enter the account password again and jump directly to the corresponding page
the first thought is to use the storage user id to redis to get the token and then verify it again, but you must add a connection that does not require authentication, but I don"t think this is very good
app.use(jwtKoa({secret}).unless({
path: [/^\/adduser/, /^\/login/] ///^\/product\/getToken/jwt
}))
the second one is based on the user"s id storage client token, and then takes the token to verify
Learning node+koa wants to write a small example to practice, but I don"t know how to write it. Please give me some advice
.