Commit 8db9062e authored by 任国军's avatar 任国军

fix token bug

parent 44491272
Pipeline #21920 passed with stage
in 3 seconds
......@@ -92,9 +92,9 @@ class UserService extends Service {
session_key: '',
phone,
};
await ctx.app.memcache.set(key, value);
await ctx.app.memcache.set(key, value, 7 * 24 * 3600);
const authToken = await this.service.jwt.apply({ user_uuid: userInfo.uuid, openid: userInfo.openid });
await app.memcache.set('course_auth_token_' + userInfo.uuid, authToken);
await app.memcache.set('course_auth_token_' + userInfo.uuid, authToken, 7 * 24 * 3600);
const ret = {
user_uuid: userInfo.uuid,
......@@ -135,9 +135,9 @@ class UserService extends Service {
session_key,
phone: userInfo.phone,
};
await app.memcache.set(key, value);
await app.memcache.set(key, value, 7 * 24 * 3600);
const authToken = await this.service.jwt.apply({ user_uuid: userInfo.uuid, openid: userInfo.openid });
await app.memcache.set('course_auth_token_' + userInfo.uuid, authToken);
await app.memcache.set('course_auth_token_' + userInfo.uuid, authToken, 7 * 24 * 3600);
const ret = {
user_uuid: userInfo.uuid,
......@@ -225,9 +225,9 @@ class UserService extends Service {
session_key: ctx.isEmpty(userSession) ? '' : userSession.session_key,
phone: data.phone,
};
await app.memcache.set(key, value);
await app.memcache.set(key, value, 7 * 24 * 3600);
const authToken = await this.service.jwt.apply({ user_uuid: data.uuid, openid: user.openid });
await app.memcache.set('course_auth_token_' + data.uuid, authToken);
await app.memcache.set('course_auth_token_' + data.uuid, authToken, 7 * 24 * 3600);
const ret = {
user_uuid: data.uuid,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment