Skip to content

Commit

Permalink
🔥 Remove Twitter login (laravelcm#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts authored Jul 1, 2023
1 parent 6ae39be commit b6c9f8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
11 changes: 4 additions & 7 deletions app/Traits/HasSocialite.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait HasSocialite
*/
public function getAcceptedProviders(): array
{
return ['github', 'twitter'];
return ['github'];
}

protected function getSocialiteUser(string $provider): User
Expand All @@ -31,18 +31,15 @@ protected function getAuthorizationFirst(string $provider): RedirectResponse|\Sy
$fields = empty(config("services.{$provider}.fields")) ? false : config("services.{$provider}.fields");

if ($scopes) {
// @phpstan-ignore-next-line
$socialite->scopes($scopes);
$socialite->scopes($scopes); // @phpstan-ignore-line
}

if ($with) {
// @phpstan-ignore-next-line
$socialite->with($with);
$socialite->with($with); // @phpstan-ignore-line
}

if ($fields) {
// @phpstan-ignore-next-line
$socialite->fields($fields);
$socialite->fields($fields); // @phpstan-ignore-line
}

return $socialite->redirect();
Expand Down
10 changes: 1 addition & 9 deletions resources/views/partials/_socials-link.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,13 @@
</div>
</div>

<div class="mt-6 grid grid-cols-2 gap-2">
<div class="mt-6">
<div>
<x-default-button :link="route('social.auth', ['provider' => 'github'])" class="w-full font-normal">
<span class="sr-only">{{ __('Continuer avec Github') }}</span>
<x-icon.github class="w-5 h-5 mr-2 -ml-1" />
Github
</x-default-button>
</div>

<div>
<x-default-button :link="route('social.auth', ['provider' => 'twitter'])" class="w-full font-normal">
<span class="sr-only">{{ __('Continuer avec Twitter') }}</span>
<x-icon.twitter class="w-5 h-5 mr-2 -ml-1 text-[#1E9DEA]" />
Twitter
</x-default-button>
</div>
</div>
</div>

0 comments on commit b6c9f8e

Please sign in to comment.