vinelab/social-auth

v3.1.1 2015-03-22 22:58 UTC

This package is auto-updated.

Last update: 2024-08-27 22:23:44 UTC


README

Build Status

社交认证 - Laravel

Dependency Status

SensioLabsInsight

安装

使用 composer require the package vinelab/social-auth. 编辑 app.php 并将 'Vinelab\Auth\AuthServiceProvider' 添加到 'providers' 数组中。它将自动别名为 SocialAuth,这是一个 Facade。

配置

使用 php artisan vendor:publish 发布配置文件

用法

<?php

// start the authentication process
$provider = 'facebook';

// inital authentication route
SocialAuth::authenticate($provider);

// callback route should do this
$profile = SocialAuth::profile($provider, Input::get());

$profile->provider(); // facebook
$profile->info(); // the facebook profile information