All Projects → azate → laravel-telegram-login-auth

azate / laravel-telegram-login-auth

Licence: MIT License
This package is a Laravel service provider which provides support for Laravel Login and is very easy to integrate with any project that requires Telegram authentication.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to laravel-telegram-login-auth

blueauth
🔐 Serverless passwordless authentication. No databases needed. Use in just 1 line in serverless, middleware, express, next.js, and more.
Stars: ✭ 56 (+124%)
Mutual labels:  auth
react-apple-signin-auth
 Apple signin for React using the official Apple JS SDK
Stars: ✭ 58 (+132%)
Mutual labels:  auth
Casbin4D
An authorization library that supports access control models like ACL, RBAC, ABAC in Delphi
Stars: ✭ 25 (+0%)
Mutual labels:  auth
littleca
littleca是一个基于BC的小型ca库,支持ecc,rsa,dsa,sm2的证书签发,加密解密,签名验签操作,支持国密加解密,证书签发
Stars: ✭ 44 (+76%)
Mutual labels:  auth
MyTelegramOrgRoBot
telegram.dog/usetgxbot
Stars: ✭ 94 (+276%)
Mutual labels:  auth
pstore
🔧 Middleware for keeping track of users, login states and permissions, using the HSTORE feature in PostgreSQL
Stars: ✭ 28 (+12%)
Mutual labels:  auth
yii-auth-client
Yii Framework external authentication via OAuth and OpenID Extension
Stars: ✭ 20 (-20%)
Mutual labels:  auth
authz0
🔑 Authz0 is an automated authorization test tool. Unauthorized access can be identified based on URLs and Roles & Credentials.
Stars: ✭ 248 (+892%)
Mutual labels:  auth
auth
www.yiiframework.com/
Stars: ✭ 28 (+12%)
Mutual labels:  auth
restify-jwt-community
Restify middleware that validates a JsonWebToken
Stars: ✭ 24 (-4%)
Mutual labels:  auth
HerokuContainer
Dockerized ASP.NET Core Web API app in Heroku
Stars: ✭ 26 (+4%)
Mutual labels:  auth
permissionbolt
🔩 Middleware for keeping track of users, login states and permissions
Stars: ✭ 81 (+224%)
Mutual labels:  auth
auth-jwt
www.yiiframework.com/
Stars: ✭ 28 (+12%)
Mutual labels:  auth
casbin-ex
An authorization library that supports access control models like ACL, RBAC, ABAC in Elixir
Stars: ✭ 37 (+48%)
Mutual labels:  auth
kauth
🔑 kauth is JWT API Authentication ( jwt-auth ) for laravel
Stars: ✭ 14 (-44%)
Mutual labels:  auth
supabase-ui-svelte
Supabase authentication UI for Svelte
Stars: ✭ 83 (+232%)
Mutual labels:  auth
laravel-livewire-ui
Laravel Livewire UI, Auth, & CRUD starter kit.
Stars: ✭ 92 (+268%)
Mutual labels:  auth
httpx auth
Authentication classes to be used with httpx
Stars: ✭ 59 (+136%)
Mutual labels:  auth
netlify-faunadb-graphql-auth
Netlify functions example with faunadb, graphql, and authorization
Stars: ✭ 57 (+128%)
Mutual labels:  auth
passport-laravel
Telegram Unofficial OAuth2 Provider for Laravel Socialite
Stars: ✭ 26 (+4%)
Mutual labels:  auth

Telegram Login for Laravel

License Latest Stable Version Total Downloads

This package is a Laravel service provider which provides support for Laravel Login and is very easy to integrate with any project that requires Telegram authentication.

Installation

Require this package with composer.

composer require azate/laravel-telegram-login-auth

Laravel >=5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Copy the package config to your local config with the publish command:

php artisan vendor:publish --provider="Azate\LaravelTelegramLoginAuth\Providers\LaravelServiceProvider" --tag=config

Usage example

Setup information Telegram Login Widget

Not detailed errors

// app/Http/Controllers/AuthController.php
namespace App\Http\Controllers;

// ...
use Azate\LaravelTelegramLoginAuth\TelegramLoginAuth;
use Illuminate\Http\Request;

// ...
public function handleTelegramCallback(TelegramLoginAuth $telegramLoginAuth, Request $request)
{
    if ($user = $telegramLoginAuth->validate($request)) {
        // ...
    }

    // ...
}

With detailed errors

// app/Http/Controllers/AuthController.php
namespace App\Http\Controllers;

// ...
use Azate\LaravelTelegramLoginAuth\Contracts\Telegram\NotAllRequiredAttributesException;
use Azate\LaravelTelegramLoginAuth\Contracts\Validation\Rules\ResponseOutdatedException;
use Azate\LaravelTelegramLoginAuth\Contracts\Validation\Rules\SignatureException;
use Azate\LaravelTelegramLoginAuth\TelegramLoginAuth;
use Illuminate\Http\Request;

// ...
public function handleTelegramCallback(TelegramLoginAuth $telegramLoginAuth, Request $request)
{
    try {
        $user = $telegramLoginAuth->validateWithError($request);
    } catch(NotAllRequiredAttributesException $e) {
        // ...
    } catch(SignatureException $e) {
        // ...
    } catch(ResponseOutdatedException $e) {
        // ...
    } catch(Exception $e) {
        // ...
    }

    // ...
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].