fix: export const Token type

This commit is contained in:
Дмитрий
2026-03-27 12:37:44 +03:00
parent db703df2cb
commit 46b0a79a19
3 changed files with 7 additions and 7 deletions

View File

@@ -1 +1,6 @@
export const PASSPORT_OPTIONS = Symbol('PassportOptions')
export const TOKEN_TYPES = {
AUTH: 'PassportToken/v1',
TEMP_2FA: 'PassportToken/v1/2fa'
} as const

View File

@@ -1,15 +1,10 @@
import { Inject, Injectable } from '@nestjs/common'
import { createHmac, randomUUID } from 'crypto'
import { PASSPORT_OPTIONS } from './constants'
import { PASSPORT_OPTIONS, TOKEN_TYPES } from './constants'
import { PassportOptions } from './interfaces'
import { base64UrlDecode, base64UrlEncode, constantTimeEqual } from './utils'
const TOKEN_TYPES = {
AUTH: 'PassportToken/v1',
TEMP_2FA: 'PassportToken/v1/2fa'
} as const
type TokenType = (typeof TOKEN_TYPES)[keyof typeof TOKEN_TYPES]
@Injectable()