UNPKG

passport-telegram-web-app

Version:

A [Passport](https://www.passportjs.org/) strategy for [telegram web app (bots)](https://core.telegram.org/bots/webapps) authentication.

12 lines (9 loc) 216 B
export class ExtractHash { public static fromHeaders(request: any): string | null { const hash = request.headers["tg-web-app-hash"]; if (!hash) { return null; } return hash as string; } }