Skip to content

Instantly share code, notes, and snippets.

@rasikag
Created March 16, 2021 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rasikag/d78f21acd9abcca5a88cdbae65c19d0a to your computer and use it in GitHub Desktop.
Save rasikag/d78f21acd9abcca5a88cdbae65c19d0a to your computer and use it in GitHub Desktop.
// in resolvers/user.ts file
// first get the key out
const key = FORGET_PASSWORD_PREFIX + token;
const userId = await redis.get(key);
// then delete the key
await redis.del(key);
req.session.userId = user.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment