nuxt-telegram-auth
๐ Telegram login widget integration for Nuxt
4,434
35
| Install | |
|---|---|
npm install nuxt-telegram-auth |
|
| Latest Version: | 1.3.5 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Sep 9, 2026 |
| Links: | GitHub · npm |
Maintainer: halitsever
๐ A telegram login widget integration for nuxt 3
- ๐ Easy Integration - A telegram bot and this module enough for telegram login widget
- ๐ Auth Endpoint - Nuxt Telegram Module provides a api endpoint for checking is user's cookie valid or not: /api/telegram/session, this method integrated from official example php code
Installation:
npx nuxi module add nuxt-telegram-auth
Then you need add TELEGRAM_TOKEN to your runtimeConfig:
runtimeConfig: {
TELEGRAM_TOKEN: "my_fancy_bot_token",
}
after that you can try on a page:
<template>
<div>
<div>
<div v-if="session.loggedIn">
<NuxtLink @click="logout" to="/">Logout</NuxtLink>
<a>Hey you are logged in!</a>
<p>Session: {{ session }}</p>
</div>
<div v-else>
<TelegramLoginWidget telegram-login="my_bot" @callback="testCallback" />
</div>
</div>
</div>
</template>
<script setup>
const { clearSession, session } = useUserSession();
const logout = () => clearSession();
const testCallback = (user) => {
console.log("Custom callback function: ",user);
};
</script>
for more detailed information, please check the documentation page.
MIT LICENSE | Halit Sever
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.3.5 | ^3.0 | MIT | |
| 1.3.0 | ^3.0 | MIT | |
| 1.2.6 | ^3.0 | MIT | |
| 1.2.5 | ^3.0 | MIT | |
| 1.2.3 | ^3.0 | MIT | |
| 1.2.0 | ^3.0 | MIT | |
| 1.1.3 | ^3.0 | MIT | |
| 1.1.2 | ^3.0 | MIT | |
| 1.1.1 | ^3.0 | MIT |