DEV Community

Discussion on: Telegram OAuth Authorization for Your Site

Collapse
 
mxlison profile image
mxlison • Edited

Create privKey using openssl genrsa 2048 > private.key, then use openssl rsa -in private.key -pubout to display pubKey, afterwards setup your pub key to bot, in @botfather using /setpublickey and send printed pubkey in format:

-----BEGIN PUBLIC KEY-----
YOUR PUBKEY
-----END PUBLIC KEY-----
Enter fullscreen mode Exit fullscreen mode

You can read this docs for better understanding Passport auth: core.telegram.org/passport