Skip to content

🔥 Remove Twitter login #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>