Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 80 | All time: 10,110 This week: 455 |
Version | License | PHP version | Categories | |||
laravel-accountkit 1.0.2 | BSD License | 5 | PHP 5, User Management, Web services, S... |
Description | Authors Ibraheem Adeniyi Contributor | ||||||||
This package allows to authenticate users with Facebook accounts. |
|
A simple package to make Password-less Login possible in Laravel using Facebook's Account Kit.
See Example Here.
>php 7.0+
>Composer
>Laravel 5.x
To use this package in a Laravel Project, install via Composer
$ composer require ibonly/laravel-accountkit
Register the package to the Service Provider in the config/app.php
file:
'providers' => [
...
Ibonly\FacebookAccountKit\FacebookAccountKitServiceProvider::class,
],
'aliases' => [
...
'AccountKit' => Ibonly\FacebookAccountKit\Facades\FacebookAccountKitFacade::class,
],
You can make of some assets provided in this package to speed up your implementation: run
$ php artisan vendor:publish
Create your app on Facebook following guidelines here.
You can view example here.
Update .env
file with credentials from Facebook:
ACCOUNTKIT_APP_ID=XXXXXXXXXXXX
ACCOUNTKIT_APP_SECRET=XXXXXXXXXXXXXXXXXXXXXXXX
Define your route in routes/web.php
. E.g:
Route::post('/otp-login', 'LoginController@otpLogin');
Import the package in your Controller and use it therein. E.g:
use AccountKit;
use Illuminate\Http\Request;
class LoginController extends Controller
{
...
public function otpLogin(Request $request)
{
$otpLogin = AccountKit::accountKitData($request->code);
...
}
}
The above return an array similar to this:
[?
"id" => "1802782826673865"
"phoneNumber" => "+234XXXXXXXXXXX",
"email" => ""
]
Update the public/js/accountkit.js
file with your appId
. Same as the one in your env.
Ensure you add Accounkit SDK to your HTML file:
<script type="text/javascript" src="https://sdk.accountkit.com/en_US/sdk.js"></script>
Ensure your form has csrf_token
, hidden input code
along with email and phone number inputs. E.g:
<input type="hidden" name="_token" id="_token" value="{{ csrf_token() }}">
<input type="hidden" name="code" id="code" />
Run any of the following commands in your terminal.
$ composer test
This package is maintained by Ibrahim Adeniyi and Surajudeen AKANDE.
Please check out CONTRIBUTING file for detailed contribution guidelines.
Please check out CHANGELOG file for information on what has changed recently.
This package is released under the MIT Licence. See the bundled LICENSE file for details.
Files (14) |
File | Role | Description | ||
---|---|---|---|---|
resources (1 directory) | ||||
src (3 files, 1 directory) | ||||
test (1 file) | ||||
CHANGELOG.md | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
CONTRIBUTING.md | Data | Auxiliary data | ||
LICENSE.md | Lic. | License text | ||
phpunit.xml.dist | Data | Auxiliary data | ||
Readme.md | Doc. | Documentation |
Files (14) | / | resources | / | config |
File | Role | Description |
---|---|---|
accountkit.js | Data | Auxiliary data |
accountKit.php | Aux. | Auxiliary script |
Files (14) | / | src |
File | Role | Description | ||
---|---|---|---|---|
Facades (1 file) | ||||
AccountKit.php | Class | Class source | ||
FacebookAccountKit.php | Class | Class source | ||
FacebookAccountKitServiceProvider.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.