Sto utilizzando Codeigniter per creare un web app.
Vorrei includere il login Microsoft, ma ho dei problemi.

Codice PHP:
$authUrl 'https://login.microsoftonline.com/tenant/oauth2/v2.0/authorize';   $query   http_build_query([        'client_id'     => ('client_secret_id'),        'client_secret' => ('client_secret'),        'response_type' => 'code',        'redirect_uri'  => 'https://ser-dev.sito.it/MS_login/login',        'scope'         => 'User.Read profile openid email'    ]);  redirect($authUrl '?' $query);    } 
Dopo
Codice PHP:
     $authUrl 'https://login.microsoftonline.com/tenant/oauth2/v2.0/token';   $query   = array(        'client_id'     => ('client_id'),        'client_secret' => ('client_secret),        'response_type' => 'code',        'grant_type' => 'authorization_code ',        'method'  => 'POST',        'redirect_uri'  => 'https://ser-dev.sito.it/MS_login/login',        'scope'         => 'User.Read profile openid email'    ); redirect($authUrl); 
Ricevo questo errore :
codice:
AADSTS900561: The endpoint only accepts POST, OPTIONS requests. Received a GET request.