Git Product home page Git Product logo

telegram-auth-nextjs's Introduction

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:

  1. Clone the Repository

    git clone https://github.com/TeaByte/telegram-auth-nextjs.git
    cd telegram-auth-nextjs
  2. Install Dependencies

    npm install
  3. Edit the .env File

    Update the BOT_TOKEN and BOT_USERNAME values in the .env file with the data you obtained from @BotFather.

  4. Start the Development Server

    npm run dev
  5. 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 3000

    Copy the ngrok URL generated and update the NEXTAUTH_URL in the .env.local file with it. Additionally, send the /setdomain command 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.

Telegram Authentication Flow

telegram-auth-nextjs's People

Contributors

teabyte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

telegram-auth-nextjs's Issues

Log out

Hi Team, could you provide any information how I can log out (or terminate session) via js on the site using your lib, please?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.