1. Go to this page and download the library: Download salexcarvalho/govbr-auth library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Salexcarvalho\GovBrAuth\Exceptions\GovBrAuthException;
public function register(): void
{
$this->renderable(function (GovBrAuthException $e) {
return redirect()->route('login')
->withErrors(['govbr' => 'Não foi possível autenticar via Gov.br. Tente novamente.']);
});
}