Download the PHP package ipunkt/social-auth without Composer

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

ipunkt/social-auth

Social-Auth is a Laravel package which wraps around a oauth library and laravel with the goal to let you simply set the provider credentials and be done.

It currently uses hybrid_auth in the background. With the coming of the new SocialLite package for laravel i will probably switch out hybrid_auth for it.

Install

Installation

Add the following lines to your composer.json:

"require": {
    "ipunkt/social-auth": "dev-master"
}

Configuration

To configure 3 steps are necessary.
If you wish for user deletes to trigger deletion of their mappings to provider accounts make sure to set the 'user table' variable in the config before migrating

Add the service provider

Add

'Ipunkt\SocialAuth\SocialAuthServiceProvider'

to your app.php

Publish and set your config

Publish

php artisan config:publish ipunkt/social-auth

then set your provider credentials in

app/config/packages/ipunkt/social-auth/config.php

Migrate

Migrate the necessary database tables.

php artisan migrate --package="ipunkt/social-auth"

Use

Error and Message Handling

This package tries not to bring any views of its own, thus error handling is done through the session. On success, 'message' will be set directly in the Session. e.g. {{ Session::get('message') }} On error, 'message' will be set in errors. e.g. {{ $errors->first('message') }}

Authenticating with SocialAuth

Login

Letting your users log in through a SocialAuth provider is as simple as directing them to the social.login route with the name of the provider as parameter.

Attaching a Provider

Registering

Allowing your users to register using a provider account requires a little more work.

Links to all enabled Providers

Most of the time you will want to provide links to all enabled providers instead of a certain one.
To do this, use SocialAuth::getProviders() to grab all enabled providers and use *Link($innerHtml) to have it build a link for you.

Example:

Profile

The Profile is currently dependant on Hybrid_Auth_Profile as the underlying package

ProfileInterface

Function returned value
getIdentifier The unique identifier string by which the provider identifies the user
getProfileUrl Profile URL
getWebsiteUrl Website URL
getPhotoUrl Photo URL
getDisplayName Display name or "$firstName $lastName"
getDescription
getFirstName First name
getLastName Last name
getGender Gender
getLanguage Language
getAge Age
getBirthDay Day of Birth
getBirthMonth Month of Birth
getBirthYear Year of Birth
getEmail Email
getVerifiedEmail Verified Email if the provider allows it
getPhone Phone number
getAddress Address
getCountry Country
getRegion Region
getCity City
getZip ZIP or Postal code

There are 3 Ways to access Profiles:

Return Url

Your provider will ask you to set a return url where user logging into your application get sent. This is static: http://path.to/your/laravel/installation/social/auth

Advanced Use

Use your own ORM

To switch out Eloquent for the ORM of your choice do the following

1. Create a model which implements the SocialLoginInterface Create a repository which implements the SocialLoginrepository interface

bind this repository to 'Ipunkt\SocialAuth\SocialLoginInterface' in the Laravel IoC

2. Create a repository which implements the UserRepository interface

bind this repository to 'Ipunkt\SocialAuth\Repositories\UserRepository' in the Laravel IoC


All versions of social-auth with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version 4.2.*
illuminate/config Version 4.2.*
hybridauth/hybridauth Version 2.2.2
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 ipunkt/social-auth contains the following files

Loading the files please wait ....