Support the ongoing development of Laravel.io →

Socialstream — Laravel Socialite Meets Jetstream

28 Dec, 2020 2 min read

Earlier today I officially released the first version of Socialstream, a simple Laravel package that takes the scaffolding provided by Laravel Jetstream and integrates Laravel Socialite.

Jetstream is an application starter kit from the guys over at Laravel. It’s a frontend scaffold for the entire authentication layer of your application, providing registration & login, two-factor authentication, browser session management and optional team support, right out of the box. Jetstream is built on top of Laravel Fortify, a frontend agnostic authentication backend for Laravel. You can find the source code here:

https://github.com/laravel/jetstream

Socialstream started as a PR into Jetstream that surfaced as a result of a Github feature request from the creator of Laravel Debugbar.

After a month of development and discussion, the pull request was closed by Taylor since he and the team simply couldn’t take on the maintenance burden of the feature on top of all the other packages and apps they maintain. Fair play to them, between the four of them, they do A LOT of work!


Installation

Installing Socialstream is as simple as installing Jetstream. Just composer require it and run the install command. Easy!

composer require joelbutcher/socialstream

php artisan socialstream:install

Even though Socialstream requires Jetstream as a dependency, it doesn’t matter if you haven’t installed it. The command above will take you through all the necessary steps required to get you started with Jetstream and your preferred frontend stack.

Configuration & Setup

Once Socialstream is installed, it will publish a config file. In this config file, you can define whether or not the packages alterations should be shown, the middleware used to wrap the routes as well as the providers that you wish to use:

<?php
return [
    'show' => true,

    'middleware => ['web'],

    'providers => [
      'github',
      'facebook',
      'google'
    ],
];

Once you’ve defined your providers, you will need to provider client_id , client_secret and redirect keys for each in your services.php config file. E.g.

'github' => [
    'client_id' => env('GITHUB_CLIENT_ID'),
    'client_secret' => env('GITHUB_CLIENT_SECRET'),
    'redirect' => env('GITHUB_REDIRECT'),
],

That’s it! Socialstream is installed, along with all goodness that ships with Jetstream. Head on over the to repo to checkout the docs and give it a spin:

https://github.com/joelbutcher/socialstream

Last updated 2 years ago.

joedixon, driesvints, munishgarg, ostap liked this article

4
Like this article? Let the author know and give them a clap!

Other articles you might like

August 21st 2024

Find Outdated Composer Dependencies Using "composer outdated"

Introduction When building your PHP web applications, it's important to keep your dependencies up-to...

Read article
August 20th 2024

PHP 8.4 Property Hooks

Introduction PHP 8.4 will be released in November 2024 and will be bringing a cool new feature: prop...

Read article
August 19th 2024

New Array Functions in PHP 8.4

Introduction PHP 8.4 is set to be released in November 2024 and will introduce some handy new array...

Read article

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.