Skip to content

Commit

Permalink
Changed README
Browse files Browse the repository at this point in the history
  • Loading branch information
WNeuteboom committed Oct 14, 2020
1 parent 77aee28 commit 7dd511e
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Firebase Authentication for Laravel

Firebase authentication API driver for Laravel/Firevel.
Firebase authentication API driver for Laravel/WNeuteboom.

## Overview

Expand All @@ -10,7 +10,7 @@ The driver contains a firebase guard that authenticates user by Firebase Authent

1) Install the package using composer:
```
composer require firevel/firebase-authentication
composer require wneuteboom/firebase-authentication
```

2) Update config/auth.php.
Expand All @@ -29,7 +29,7 @@ composer require firevel/firebase-authentication
],
```

3) Update your User model with `Firevel\FirebaseAuthentication\FirebaseAuthenticable` trait `$incrementing = false` and fillables.
3) Update your User model with `WNeuteboom\FirebaseAuthentication\FirebaseAuthenticable` trait

Eloquent example:
```
Expand All @@ -40,25 +40,21 @@ namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use WNeuteboom\FirebaseAuthentication\FirebaseAuthenticable;
class User extends Authenticatable
{
use Notifiable, FirebaseAuthenticable;
/**
* Indicates if the IDs are auto-incrementing.
*
* @var bool
*/
public $incrementing = false;
protected $firebaseIdColumn = "firebase_id";
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'picture'
'firebase_id', 'name', 'email', 'picture'
];
}
Expand All @@ -69,21 +65,16 @@ Firequent example:
namespace App;
use Firevel\FirebaseAuthentication\FirebaseAuthenticable;
use Firevel\Firequent\Model;
use WNeuteboom\FirebaseAuthentication\FirebaseAuthenticable;
use WNeuteboom\Firequent\Model;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Model implements Authenticatable
{
use Notifiable, FirebaseAuthenticable;
/**
* Indicates if the IDs are auto-incrementing.
*
* @var bool
*/
public $incrementing = false;
protected $firebaseIdColumn = "firebase_id";
/**
* The attributes that are mass assignable.
Expand All @@ -100,7 +91,7 @@ class User extends Model implements Authenticatable

4. If you are using Eloquent you need to create or update migration for users table manually.
```
$table->string('id');
$table->string('firebase_id')->unique();
$table->string('name');
$table->string('email')->unique();
$table->string('picture');
Expand All @@ -116,7 +107,7 @@ You can also store bearer token in `bearer_token` cookie variable and add to you
protected $middlewareGroups = [
'web' => [
...
\Firevel\FirebaseAuthentication\Http\Middleware\AddAccessTokenFromCookie::class,
\WNeuteboom\FirebaseAuthentication\Http\Middleware\AddAccessTokenFromCookie::class,
...
],
Expand Down

0 comments on commit 7dd511e

Please sign in to comment.