Skip to content

Instantly share code, notes, and snippets.

@morrislaptop
Last active April 3, 2021 14:21
Show Gist options
  • Save morrislaptop/49fb7cdbc09110b21aa27e9976b8fc3c to your computer and use it in GitHub Desktop.
Save morrislaptop/49fb7cdbc09110b21aa27e9976b8fc3c to your computer and use it in GitHub Desktop.
<?php
Auth::viaRequest('firebase', function ($request) {
return app(FirebaseGuard::class)->user($request);
});
@morrislaptop
Copy link
Author

use Illuminate\Support\Facades\Auth;

FirebaseGuard is just a simple class you have to implement yourself. It can be DI'ed, and the user() function should accept a $request and return a Authenticable object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment