<?php

declare(strict_types=1);

/** @var \GNexus\GAuth\Client\GAuthClient $client */
$client = require __DIR__ . '/bootstrap.php';

$authorizationRequest = $client->buildAuthorizationRequest(
    returnTo: '/protected.php',
    scopes: ['openid', 'email', 'profile', 'roles', 'permissions'],
);

header('Location: ' . $authorizationRequest->authorizationUrl);
exit;

