telegram-auth-nextjs
                                
                                 telegram-auth-nextjs copied to clipboard
                                
                                    telegram-auth-nextjs copied to clipboard
                            
                            
                            
                        Telegram OAuth nextJS provider
Telegram Authentication with NextAuth.js Example
This example demonstrates how to set up Telegram authentication using NextAuth.js along with other technologies such as Next.js, PrismaJS, Tailwind CSS, and ShadcnUI.
Getting Started
Follow these steps to get started with the Telegram authentication example:
- 
Clone the Repository git clone https://github.com/TeaByte/telegram-auth-nextjs.git cd telegram-auth-nextjs
- 
Install Dependencies npm install
- 
Edit the .envFileUpdate the BOT_TOKENandBOT_USERNAMEvalues in the.envfile with the data you obtained from @BotFather.
- 
Start the Development Server npm run dev
- 
Expose Your Local Server with ngrok If you want to test the authentication over the internet, you can use ngrok to expose your local server: ngrok http 3000Copy the ngrok URL generated and update the NEXTAUTH_URLin the.env.localfile with it. Additionally, send the/setdomaincommand to @BotFather with the ngrok URL to resolve the "Bot domain invalid" error.
Remember to replace placeholders and follow the instructions in the example to set up Telegram authentication for your Next.js application. This example combines the power of NextAuth.js, PrismaJS, Tailwind CSS, and ShadcnUI to create a seamless authentication experience using Telegram.
