Skip to content

Commit

Permalink
add microsoft oauth button
Browse files Browse the repository at this point in the history
  • Loading branch information
warcooft committed Sep 14, 2024
1 parent c5de781 commit 3993ca0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Libraries/Basic/ShieldOAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private function otherOAuth()
{
$pieces = explode('|', $this->allOAuth());

return array_diff($pieces, ['github', 'google']);
return array_diff($pieces, ['github', 'google', 'microsoft']);
}

/**
Expand Down Expand Up @@ -127,10 +127,11 @@ public function makeOAuthButton(string $forPage = 'login'): string

$Button .= '<a href=' . base_url('oauth/google') . " class='btn btn-outline-secondary' aria-current='page'>" . lang('ShieldOAuthLang.Google.google') . '</a>';
$Button .= '<a href=' . base_url('oauth/github') . " class='btn btn-outline-secondary' aria-current='page'>" . lang('ShieldOAuthLang.Github.github') . '</a>';
$Button .= '<a href=' . base_url('oauth/microsoft') . " class='btn btn-outline-secondary' aria-current='page'>" . lang('ShieldOAuthLang.Microsoft.microsoft') . '</a>';
if ($this->otherOAuth() !== []) {
$Button .= "<div class='btn-group' role='group'>
<button type='button' class='btn btn-outline-secondary dropdown-toggle' data-bs-toggle='dropdown' aria-expanded='false'>"
. lang('ShieldOAuthLang.other') . "
. lang('ShieldOAuthLang.other') . "
</button>
<ul class='dropdown-menu'>";

Expand Down

0 comments on commit 3993ca0

Please sign in to comment.