Compare commits

..

2 Commits

Author SHA1 Message Date
Дмитрий
c275367d86 fix: export const Token type
All checks were successful
Publish / Publish Job (push) Successful in 43s
2026-03-27 12:38:04 +03:00
Дмитрий
46b0a79a19 fix: export const Token type 2026-03-27 12:37:44 +03:00
4 changed files with 8 additions and 7 deletions

View File

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

View File

@@ -1,3 +1,4 @@
export * from './interfaces' export * from './interfaces'
export * from './passport.module' export * from './passport.module'
export * from './passport.service' export * from './passport.service'
export * from './constants'

View File

@@ -1,15 +1,10 @@
import { Inject, Injectable } from '@nestjs/common' import { Inject, Injectable } from '@nestjs/common'
import { createHmac, randomUUID } from 'crypto' import { createHmac, randomUUID } from 'crypto'
import { PASSPORT_OPTIONS } from './constants' import { PASSPORT_OPTIONS, TOKEN_TYPES } from './constants'
import { PassportOptions } from './interfaces' import { PassportOptions } from './interfaces'
import { base64UrlDecode, base64UrlEncode, constantTimeEqual } from './utils' 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] type TokenType = (typeof TOKEN_TYPES)[keyof typeof TOKEN_TYPES]
@Injectable() @Injectable()

View File

@@ -1,6 +1,6 @@
{ {
"name": "@lendry-erp/passport", "name": "@lendry-erp/passport",
"version": "1.0.1", "version": "1.0.2",
"description": "Библиотека для аутентификации.", "description": "Библиотека для аутентификации.",
"main": "./dist/index.js", "main": "./dist/index.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",