I am doing a project where the database is already built for a mobile app
Problem is now I need to make the website and integrate the database, which is Firebase Realtime Database, to use the credentials for logging in.
Is there any best practice to authenticate the realtime database to be used as a login credentials?
I tried using firebase getValue() function to fetch the data and compare the value with laravel authentication method, but still confused on how to properly structure it
Here’s a portion of my code:
class ControllerLogin extends Controller
{
public function __construct(Database $database)
{
$this->database = $database;
$this->tablename = ‘Tablet’;
}
public function index()
{
$reference = $this->database->getReferance($this->tablename)->getValue();
return view('loginpage');
}
NUL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.