Warning
Deprecated. This example uses the @telegram-auth/* packages, which are deprecated in favour of Telegram's OpenID Connect login.
The equivalent is two routes — one that redirects to https://oauth.telegram.org/auth with PKCE, one that exchanges the code and verifies the ID token.
→ Rolling it yourself in the migration guide.
Kept for reference only; it is not maintained.
-
Clone the repository
git clone https://github.com/manzoorwanijk/telegram-auth.git cd telegram-auth -
Install and build dependencies
pnpm install pnpm kick-off
-
Go to the remix-basic example folder
cd examples/remix-basic -
Create a
.envfile by copying.example.envand updateBOT_TOKENandBOT_USERNAMEwith your bot's token and username that you got from @BotFather. -
Start the dev server
pnpm run dev
-
You may want to use ngrok to expose your local server to the internet.
ngrok http 3000
Don't forget to send
/setdomaincommand to @BotFather with the ngrok URL to fix the "Bot domain invalid" error.