PHPackages                             xtodx/telegram-socialite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. xtodx/telegram-socialite

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

xtodx/telegram-socialite
========================

Telegram provider for Laravel Socialite

v2.0.5(5y ago)0103MITPHP

Since May 26Pushed 5y agoCompare

[ Source](https://github.com/xtodx/TelegramSocialite)[ Packagist](https://packagist.org/packages/xtodx/telegram-socialite)[ RSS](/packages/xtodx-telegram-socialite/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (9)Used By (0)

[![Style Status](https://camo.githubusercontent.com/44fb7e07f23846da13e88f8d669cc81a294df7afff89b41b6e0dae87aa4e2e1c/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3236363939383735392f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/266998759) [![Latest Stable Version](https://camo.githubusercontent.com/526c34d286592c39278f3c67037cae4b2d3872889eb8c4d433f26f928cc9f3a9/68747470733a2f2f706f7365722e707567782e6f72672f6d617831332f74656c656772616d2d736f6369616c6974652f76)](//packagist.org/packages/max13/telegram-socialite)

TelegramSocialite
=================

[](#telegramsocialite)

Telegram provider for Laravel Socialite

Install
-------

[](#install)

```
composer require max13/telegram-socialite

```

Configuration
-------------

[](#configuration)

First of all, you must create a bot by contacting [@BotFather](http://t.me/BotFather) ()

> Don't forget to set your website URL using `/setdomain`

Then, as required by [Laravel Socialite](https://laravel.com/docs/socialite#configuration), you need to add your bot's configuration to `config/services.php`. The bot username is required, `client_id` must be `null`. The provider will also ask permission for the bot to write to the user.

```
'telegram' => [
    'client_id' => null,
    'client_secret' => env('TELEGRAM_TOKEN'),
    'redirect' => '/login/telegram/callback',
]
```

Usage
-----

[](#usage)

Now, Telegram is technically using `OAuth`, but not the usual workflow.

First or all, you **must** add a javascript to your page, anywhere you want (in the `` or bottom of page) with this snippet:

```
{!! Socialite::driver('telegram')->getScript() !!}
```

You also **must** call `_TWidgetLogin.auth()` on click on your login button, which will open a popup showing the Telegram OAuth access request. Because of browser's security, you can't automatically call this, it must be called as a result of a user's action.

If the user **accept** the access request, the browser is redirected to your `services.telegram.redirect` config key and you will have access to the logged-in user data the classic `Socialite` way:

```
Socialite::driver('telegram')->user();
```

If the user **declines**, an `InvalidArgumentException` exception will be thrown.

Using `Socialite::driver('telegram')->redirect()` will abort the connection with a `404` error.

If you want to see the Telegram Widget configuration page:

Issues
------

[](#issues)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 64.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~15 days

Recently: every ~26 days

Total

8

Last Release

2064d ago

Major Versions

v1.1.0 → v2.0.02020-05-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/90301739899b418ac147020ef8fb09f1c8eea487e02f1bf1153bbade39564c6f?d=identicon)[xtodx](/maintainers/xtodx)

---

Top Contributors

[![Max13](https://avatars.githubusercontent.com/u/531249?v=4)](https://github.com/Max13 "Max13 (9 commits)")[![xtodx](https://avatars.githubusercontent.com/u/18610137?v=4)](https://github.com/xtodx "xtodx (5 commits)")

---

Tags

laraveloauthtelegramlaravel socialite

### Embed Badge

![Health badge](/badges/xtodx-telegram-socialite/health.svg)

```
[![Health](https://phpackages.com/badges/xtodx-telegram-socialite/health.svg)](https://phpackages.com/packages/xtodx-telegram-socialite)
```

###  Alternatives

[socialiteproviders/manager

Easily add new or override built-in providers in Laravel Socialite.

42442.0M544](/packages/socialiteproviders-manager)[schedula/laravel-passport-socialite

The missing laravel passport feature for social authentication

5022.6k](/packages/schedula-laravel-passport-socialite)[kovah/laravel-socialite-oidc

OpenID Connect OAuth2 Provider for Laravel Socialite

2073.7k](/packages/kovah-laravel-socialite-oidc)[laravel-uis/socialite-ui

A Laravel Socialite UI for the new Laravel Starter Kits

114.3k1](/packages/laravel-uis-socialite-ui)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
