It provide an easy way to integrate UAE Pass services in your application.
Contact UAE Pass team to get your client id and token.
use Ragab\UaePass;
// Customize your configuration
$uae = UaePass::fromClient([
'client_id' => 'YOUR CLIENT ID',
'token' => 'YOUR TOKEN',
'redirect_url' => '/redirect/callback',
'localization' => 'en',
'production' => false
]);
To login the user using UAE Pass, you can use the following code:
// Redirect to UAE Pass login page in order to for the user to login
$uae->login();
To register the user using UAE Pass, you can use the following code:
// Redirect to UAE Pass register page in order to for the user to register an account
$uae->register();
You can handle the callback to get the user data using the following code;
$uae->user($_GET['code'], $_GET['state']);
To logout the user using UAE Pass, you can use the following code:
$uae->logout();