DEV Community

Joysankar Majumdar
Joysankar Majumdar

Posted on

TeleIn

Overview of My Submission

I have build an authentication system where user can login in the application(android) with the help of Telegram (Bot service). In this system , any user has not to go through any hassel. Any user just need to follow the steps to login the TeleIn app

  1. Go to TeleIn app's login page
  2. Click Login and it will redirect to Telegram app
  3. Now in Telegram , just click start
  4. The TeleIn Telegram Bot will provide a link
  5. Click the link and you will be redirect to the TeleIn
  6. By default it'll take your Telegram name, you can change it now and Submit.

That's it. Its too simple. No OTP no email comfirmation no extra auth flow! Just simple!

Cosmos DB is the place where I store the data of user safely using the Node server.

Submission Category:

Wacky Wildcards

Link to Code on GitHub

Server

Telein Server

This is the backend of TeleIn Android App The backend server is based on NodeJs and it uses Telegraf to make conection with Telegram Bot This backend is hosted on Render.

Code snippets

async function login(keyid, res) {
  resourcesMain = await container.items
    .query({
      query: "SELECT * from c WHERE c.tempuid = @Uid",
      parameters: [{ name: "@Uid", value: keyid }],
    })
    .fetchAll();

  resources = await container2.items
    .query({
      query: "SELECT * from c WHERE c.tid = @Tid",
      parameters: [{ name: "@Tid", value: resourcesMain.resources[0].tid }],
    })
    .fetchAll();

    if(resources.resources.length == 0){
        var crtAcc =
Enter fullscreen mode Exit fullscreen mode

Android

TeleIn-Android

I have build an authentication system where user can login in the application(android) with the help of Telegram (Bot service). In this system , any user has not to go through any hassel. Any user just need to follow the steps to login the TeleIn app

  1. Go to TeleIn app's login page
  2. Click Login and it will redirect to Telegram app
  3. Now in Telegram , just click start
  4. The TeleIn Telegram Bot will provide a link
  5. Click the link and you will be redirect to the TeleIn
  6. By default it'll take your Telegram name, you can change it now and Submit.

That's it. Its too simple. No OTP no email comfirmation no extra auth flow! Just simple!

Used Tech

  1. Cosmos DB
  2. Okhttp3
  3. Coroutine

Demo

https://bafybeigudm4ljexyo6qrjwpumkw6t4kblgyau7hjv7raqfycvmvjmpogce.ipfs.dweb.link/Record_2022-02-20-01-32-15.mp4




Additional Resources / Info

Tech Used

  1. Cosmos DB
  2. Telegram Bot
  3. Render

Demo

Top comments (1)