Download the PHP package bkstar123/social-auth without Composer

On this page you can find all versions of the php package bkstar123/social-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 social-auth

laravel-social-auth

Laravel provides an official package named as Socialite to enable an easy implementation of the social login feature. Although, it is absolutely convenient and simple, it still requires some non trivial piece of code.

Sometimes, the repetitious work can cause an inertia for you to start a new project. To eliminate this issue and quickly gain a momentum for a new idea, this package is built to provide a thin layer wrapping over the Socialite package for the even easier implementation of the social login for a Laravel application.

1 Requirements

It is recommended to install this package with PHP version 7.1.3+ and Laravel Framework version 5.5+

2 Installation

composer require bkstar123/social-auth

3 Usage

3.1 Default usage

This package is by default assumed to be used together with the Laravel's default authentication guard (as specified in ) and model.

Note: If you already run the user migration, you should create another migration to update table with the new column and set & columns to be nullable (, are already supplied in the Laravel default user migration), for example:

Run:

yyyy_mm_dd_xxxxxxxx_update_users_table.php:

Where can be GOOGLE, FACEBOOK, TWITTER, LINKEDIN, GITHUB, GITLAB, BITBUCKET.

3.2 Custom usage

3.2.1 If you do not want to use the package default migration:

Note: , are required to be named as they are in the migration, the foreign key ( in the above example) can be named appropriately depending on your use cases.

Alternatively, you can publish the package's default migration to and use it as a starting point for customization.
=> Run:

3.2.2 You can define your custom social account model which has a relationship with your custom user model

app/Models/CustomerSocialAccount.php:

3.2.3 You can also tell the package to use your custom social account and user models

For example:

After importing and using trait, add the following method:

3.2.4 You can change which kind of the social data you want to map to the user which is to be persisted to the database

For example:
Assuming that your table has , . Then, in the controller which handles the login logic, add the following method:

3.2.5 You can use beforeFirstSocialLogin() hook to add more business logic before signing in a user using her social account at the first time

For example, you may need to set for a user before signing her in using her social account at the first time if your application enforces a logic that all users must be verified before being able to use some features.

To do so, in the controller which handles the login logic, add the following method:

3.2.6 You can customize the action that is to be taken after successfully signing in a user using her social account

For example: You may want to explicitly redirect the authenticated user to a dashboard

3.2.7 You can customize the action that is to be taken if your application fails to get data from the social provider

For example: You may want to redirect the user to the customer login page in this case

By default, the package uses the Laravel's default authentication guard which is specified in .
This behavior can be overwritten by the method defined in your controller (which handles the login logic):

For example: You may want the package to use the custom authentication guard named as


All versions of social-auth with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
laravel/socialite Version ^4.1
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 bkstar123/social-auth contains the following files

Loading the files please wait ....