<?php require dirname(__DIR__).'/includes/bootstrap.php';if(empty($config['google']['client_id']))exit('Google login is not configured. Add the OAuth credentials in config.php.');$_SESSION['oauth_state']=bin2hex(random_bytes(20));$q=http_build_query(['client_id'=>$config['google']['client_id'],'redirect_uri'=>$config['google']['redirect_uri'],'response_type'=>'code','scope'=>'openid email profile','state'=>$_SESSION['oauth_state'],'prompt'=>'select_account']);header('Location: https://accounts.google.com/o/oauth2/v2/auth?'.$q);
