UNPKG

refresh-tokens

Version:

refresh tokens library for nodejs server with mongodb

19 lines (18 loc) 511 B
import { Application } from 'express'; import mongoose from 'mongoose'; interface InitData { jwtSecret: string; expiresIn: number; } declare type ConnectCallback = (error?: any) => any; declare class RefreshTokens { private expiresIn; private jwtSecret; constructor(data: InitData); connectToDB(connectionData: { uri: string; options?: mongoose.ConnectionOptions; }, callback: ConnectCallback): void; init(app: Application): void; } export default RefreshTokens;