Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

371 B
Raw Blame
import { jwtVerify } from 'jose';

import { deleteAccount, signingKey } from './accounts';

export const removeAccount = async (input: { token: string }) => {
  const { payload } = await jwtVerify(input.token, signingKey, {
    audience: 'lobehub',
    issuer: 'auth',
  });
  if (!payload.sub) throw new Error('Missing subject');
  return deleteAccount(payload.sub);
};