auth-types.d.ts 339 B

123456789101112131415161718192021
  1. import type { DefaultSession } from 'next-auth';
  2. declare module 'next-auth' {
  3. interface Session {
  4. user: {
  5. id: string;
  6. groupIds: string[];
  7. } & DefaultSession['user'];
  8. }
  9. interface User {
  10. id: string;
  11. }
  12. }
  13. declare module 'next-auth/jwt' {
  14. interface JWT {
  15. userId?: string;
  16. groupIds?: string[];
  17. }
  18. }