UNPKG

simple-google-openid

Version:

A simple library for using Google as the authenticator of your application's users.

13 lines (12 loc) 599 B
import type { RequestHandler, Request } from 'express'; import type { Profile } from 'passport'; export interface GuardMiddlewareOptions { realm?: string; } export interface SimpleGoogleOpenID extends RequestHandler { guardMiddleware: (opts?: GuardMiddlewareOptions) => RequestHandler; verifyToken: (token: string) => Promise<Profile | undefined>; } export default function initialize(clientId: string): SimpleGoogleOpenID; export declare function guardMiddleware(options?: GuardMiddlewareOptions): RequestHandler; export declare function getAuthToken(req: Request): string | undefined;