norotaro / wn-firebaseusers-plugin
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 2
Open Issues: 0
Type:winter-plugin
Requires
- norotaro/wn-firebase-plugin: ^1.0
- norotaro/wn-rest-plugin: ^1.0
- winter/wn-user-plugin: ^2.0
This package is auto-updated.
Last update: 2024-10-12 00:13:47 UTC
README
Synchronize users between Firebase and Winter.Users
.
Installation
First install the plugin with composer:
composer require norotaro/wn-firebaseusers-plugin
Then run the migration files with:
php artisan winter:up
Usage
After configure Firebase Plugin you can run the following command for synchronize user:
php artisan firebaseusers:sync
Protect endpoints
You can use the AuthenticationControl
middleware for protect an endpoint, this middleware expect a valid bearer token that is verified against Firebase.
<?php Route::middleware([\Norotaro\FirebaseUsers\Middlewares\AuthenticationControl::class]) ->group(function () { // All routes here will require a valid Firebase bearer token });
Users table modifications
This plugin adds fb_uid
and fb_sync
columns on users
table, and also change the definition of the email
column to allow null values and remove the unique restriction.
Suport
License
FirebaseUsers for WinterCMS is licensed under the MIT License.
Your use of Firebase is governed by the Terms of Service for Firebase Services.