You may install by running the composer require
command in your terminal:
composer require gbrits/firebase-laravel-auth-sidecar
FIREBASE_API_KEY=AIzXXgibberxJf4_5rlradjabberTsMpX
FIREBASE_AUTH_DOMAIN=acme.firebaseapp.com
FIREBASE_DATABASE_URL=https://acme.firebaseio.com
FIREBASE_PROJECT_ID=acme
FIREBASE_STORAGE_BUCKET=acme.appspot.com
FIREBASE_MESSAGING_SENDER_ID=800813513371
Gbrits\Firebase\Auth\ServiceProvider::class,
php artisan vendor:publish --provider="Gbrits\Firebase\Auth\ServiceProvider"
use Gbrits\Firebase\Auth\AuthenticatesUsers;
class LoginController extends Controller {
use RegistersUsers, AuthenticatesUsers, ValidatesRequests;
$fillable = [
~ all your other fields ~, 'id_token', 'photo_url'
];
Route::post('auth', 'Auth\LoginController@postAuth')->name('postAuth');
Route::get('logout', 'Auth\LoginController@logout')->name('logout');
@firebaseuiheader
@firebaseuiwidget
@firebaseuifooter
php artisan config:cache
php artisan view:cache
Specifically in that order, as the Laravel directives utilise config values. Be sure to clear the view cache with every alteration you make to the directive views (in the vendor files), otherwise your changes won't apply.
Oh go on, buy me a beer. Or a sugarfree Rockstar.