2017 © Pedro Peláez
 

library laravel-telegram-login-auth

Laravel Telegram Login Auth

image

azate/laravel-telegram-login-auth

Laravel Telegram Login Auth

  • Monday, March 5, 2018
  • by arikaiy
  • Repository
  • 0 Watchers
  • 2 Stars
  • 36 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 13 % Grown

The README.md

Telegram Login for Laravel

License Latest Stable Version Total Downloads, (*1)

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., (*2)

Installation

Require this package with composer., (*3)

composer require azate/laravel-telegram-login-auth

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

Copy the package config to your local config with the publish command:, (*5)

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

Usage example

Setup information Telegram Login Widget, (*6)

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) {
        // ...
    }

    // ...
}

The Versions

05/03 2018

dev-master

9999999-dev

Laravel Telegram Login Auth

  Sources   Download

MIT

The Requires

 

by Artem Didyk

laravel auth telegram

05/03 2018

v1.0.0

1.0.0.0

Laravel Telegram Login Auth

  Sources   Download

MIT

The Requires

 

by Artem Didyk

laravel auth telegram