norotaro/wn-firebaseusers-plugin

v1.1.2 2021-09-11 17:23 UTC

This package is auto-updated.

Last update: 2024-12-12 00:36:30 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.