I want to make user Authentication in my react native mobile App not using google or facebook but Use Telegram. But in the middle of learning react native, I cannot find the package Telegram SDK Login for react native in npmjs.com. Also when google I just found this react telegram login where it is a web based.
here the full code example of using react telegram login :
import React from 'react';
import ReactDOM from 'react-dom';
import TelegramLoginButton from 'react-telegram-login';
const handleTelegramResponse = response => {
console.log(response);
};
ReactDOM.render(
<TelegramLoginButton dataOnauth={handleTelegramResponse} botName="OdauBot" />,
document.getElementById('telegramButton')
);
Then I just realize that react native cannot use DOM element such : document.getElementById('telegramButton') when I have import do import ReactDOM from 'react-dom';
Is there any way I can use DOM element in react native ? or use the react telegram login in react native ?
Then in the telegram developer site, the source just support for web based widget login.
So where I can find a telegram SDK login for react native ? I need the telegram login because I have created a bot app and the bot app is now launch a month ago. I want to sync my user where I have already save the telegram ID to my database with telegram login to get the telegram ID.
Is that possible for react native app to login using telegram ? is there any reference I need to read to make react native app to login using telegram ?