Skip to content

Commit

Permalink
Oauth login buttons do not require a session.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Jan 21, 2024
1 parent 3dcdc64 commit 303e339
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/p_signin.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@ function print_signin_form_oauth(Contact $user, Qrequest $qreq) {
return;
}
$buttons = [];
$param = array_merge(["authtype" => null], $this->_oauth_hoturl_param ?? ["redirect" => $qreq->redirect]);
$param = array_merge(["authtype" => null, "post" => $qreq->maybe_post_value()], $this->_oauth_hoturl_param ?? ["redirect" => $qreq->redirect]);
foreach ($conf->oauth_providers() as $authdata) {
if ($authdata->button_html && !($authdata->disabled ?? false)) {
$param["authtype"] = $authdata->name;
$buttons[] = Ht::button($authdata->button_html, ["type" => "submit", "formaction" => $conf->hoturl("=oauth", $param), "formmethod" => "post", "class" => "mt-2 w-100 flex-grow-1"]);
$buttons[] = Ht::button($authdata->button_html, ["type" => "submit", "formaction" => $conf->hoturl("oauth", $param), "formmethod" => "post", "class" => "mt-2 w-100 flex-grow-1"]);
}
}
if (!empty($buttons)) {
Expand Down

0 comments on commit 303e339

Please sign in to comment.