Download the PHP package stechstudio/laravel-socialite-auth without Composer

On this page you can find all versions of the php package stechstudio/laravel-socialite-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-socialite-auth

Quickly integrate Laravel Socialite into a Laravel app

Latest Version on Packagist Build Status Quality Score

This package provides quick wiring and simple configuration for the most common ways in which you may wish to integrate Laravel Socialite into your application. In addition it extends that authentication flow, enabling further logic to verify that a user meets your unique requirements before logging in.

Currently supports:

Not yet provided

Getting started

  1. Install the composer package

  2. Configure the Socialite provider you wish to use in config/services.php, specifying the redirect path as either the named route of socialite-auth.callback or the relative path /socialite-auth/callback. For example:

  3. Implement this package's SocialiteAuthenticatable Interface on each user class in your application that corresponds to a Socialite user. These two methods return the field and value which will be compared to the user returned by Socialite.

    By default these values will be compared to the email attribute returned from socialite. Below you may configure this and other options.

  4. Beyond matching a Socialite user to one in your database, you may optionally provide a closure to ensure any additional requirements are met. Provide whatever logic you require by using this package's facade within your AppServiceProvider's boot() method as follows:

Configuration

After publishing this package's configration, the following options will be available to you in config/socialite-auth.php.

Field Description
driver The OAuth service to be used by Socialite. The corresponding credentials must be provided in your services config. The default is google.
provider The user provider which contains the users you are authenticating with Socialite. Default is users
middleware Additional middleware to apply to the OAuth routes. Default is web.
field The socialite field which will be compared to the value returned by the SocialiteAuthenticatable interface. Default is email.

Usage

Use as primary authentication

Remove any existing authentication routes, such as those added by Auth::routes(). Then in config/auth.php, set the default guard to socialite

Mixed authentication

  1. This package includes its own Authenticate middleware which can be applied to perform the correct redirect in a mixed authentication environment. First add it to your route middleware in app/Http/Kernel.php.

  2. Further down, add it above the default Authenticate middleware in the priority array to ensure it takes priority over the default when applied.

Now you may freely specify Socialite authentication on some routes...

...and in-app authentication on others.

Laravel Nova authentication

Finally, it's quick to set up socialite authentication with Laravel Nova.

  1. In the NovaServiceProvider added within your Providers directory, disable the authentication related routes which are generated by default.

  2. If Socialite is configured as your default guard as above, you're all set. Otherwise add a NOVA_GUARD value to your .env file indicating that socialite is your desired guard.

All versions of laravel-socialite-auth with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
illuminate/support Version ^8.0
laravel/socialite Version ^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package stechstudio/laravel-socialite-auth contains the following files

Loading the files please wait ....