Compare commits

..

2 Commits

Author SHA1 Message Date
8b69667b57 1.0.1
All checks were successful
Publish / Publish npm package action (push) Successful in 18s
2026-02-08 09:08:20 +03:00
f4886af272 fix: fix verify types 2026-02-08 09:08:09 +03:00
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@teacinema/passport",
"version": "1.0.0",
"version": "1.0.1",
"description": "TeaCinema authentication library",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",

View File

@ -1,7 +1,7 @@
import { Inject, Injectable } from '@nestjs/common'
import { PASSPORT_OPTIONS } from './constants'
import { PassportOptions } from './interfaces'
import { PassportOptions, VerifyResult } from './interfaces'
import {
base64UrlDecode,
base64UrlEncode,
@ -47,7 +47,7 @@ export class PassportService {
return [userPart, iatPart, extPart, hmac].join(PassportService.EXTERNAL_SEP)
}
public verify(token: string) {
public verify(token: string): VerifyResult {
const parts = token.split(PassportService.EXTERNAL_SEP)
if (parts.length !== 4) {