Giter Site home page Giter Site logo

yii2-eauth's Introduction

Yii2 EAuth extension

EAuth extension allows to authenticate users with accounts on other websites. Supported protocols: OpenID, OAuth 1.0 and OAuth 2.0.

EAuth is an extension to provide a unified (does not depend on the selected service) method to authenticate the user. The extension itself does not perform login, does not register the user and does not bind the user accounts from different providers.

Why own extension and not a third-party service?

The implementation of the authorization on your own server has several advantages:

  • Full control over the process: What will be written in the authorization window, what data we get, etc.
  • Ability to change the appearance of the widget.
  • When logging in via OAuth, it is possible to invoke methods on the API.
  • Fewer dependencies on third-party services - more reliable application.

The extension allows you to:

  • Ignore the nuances of authorization through the different types of services and use the class based adapters for each service.
  • Get a unique user ID that can be used to register the user in your application.
  • Extend the standard authorization classes to obtain additional data about the user.
  • Work with the API of social networks by extending the authorization classes.
  • Set up a list of supported services, customize the appearance of the widget, use the popup window without closing your application.

Extension includes:

  • The component that contains utility functions.
  • A widget that displays a list of services in the form of icons and allowing authorization in the popup window.
  • Base classes to create your own services.
  • Ready to authenticate via Google, Twitter, Facebook and other providers.

Included services:

  • OpenID:
    • Yahoo
    • Steam
  • OAuth1:
    • Twitter
    • LinkedIn
  • OAuth2:
    • Google
    • Facebook
    • Live
    • GitHub
    • LinkedIn
    • Instagram
    • Yandex (ru)
    • VKontake (ru)
    • Mail.ru (ru)
    • Odnoklassniki (ru)

Resources

Requirements

  • Yii 2.0 or above
  • curl php extension
  • LightOpenId
  • PHPoAuthLib

Installation

This library can be found on Packagist. The recommended way to install this is through composer.

Edit your composer.json and add:

{
		"require": {
				"nodge/yii2-eauth": "~2.0"
		}
}

And install dependencies:

$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install

Usage

Demo project

The source code of the demo is available here.

Basic setup

Configuration

Add the following in your config:

<?php
...
	'components' => [
		'eauth' => [
			'class' => 'nodge\eauth\EAuth',
			'popup' => true, // Use the popup window instead of redirecting.
			'cache' => false, // Cache component name or false to disable cache. Defaults to 'cache' on production environments.
			'cacheExpire' => 0, // Cache lifetime. Defaults to 0 - means unlimited.
			'httpClient' => [
				// uncomment this to use streams in safe_mode
				//'useStreamsFallback' => true,
			],
			'services' => [ // You can change the providers and their classes.
				'google' => [
					// register your app here: https://code.google.com/apis/console/
					'class' => 'nodge\eauth\services\GoogleOAuth2Service',
					'clientId' => '...',
					'clientSecret' => '...',
					'title' => 'Google',
				],
				'twitter' => [
					// register your app here: https://dev.twitter.com/apps/new
					'class' => 'nodge\eauth\services\TwitterOAuth1Service',
					'key' => '...',
					'secret' => '...',
				],
				'yandex' => [
					// register your app here: https://oauth.yandex.ru/client/my
					'class' => 'nodge\eauth\services\YandexOAuth2Service',
					'clientId' => '...',
					'clientSecret' => '...',
					'title' => 'Yandex',
				],
				'facebook' => [
					// register your app here: https://developers.facebook.com/apps/
					'class' => 'nodge\eauth\services\FacebookOAuth2Service',
					'clientId' => '...',
					'clientSecret' => '...',
				],
				'yahoo' => [
					'class' => 'nodge\eauth\services\YahooOpenIDService',
					//'realm' => '*.example.org', // your domain, can be with wildcard to authenticate on subdomains.
				],
				'linkedin' => [
					// register your app here: https://www.linkedin.com/secure/developer
					'class' => 'nodge\eauth\services\LinkedinOAuth1Service',
					'key' => '...',
					'secret' => '...',
					'title' => 'LinkedIn (OAuth1)',
				],
				'linkedin_oauth2' => [
					// register your app here: https://www.linkedin.com/secure/developer
					'class' => 'nodge\eauth\services\LinkedinOAuth2Service',
					'clientId' => '...',
					'clientSecret' => '...',
					'title' => 'LinkedIn (OAuth2)',
				],
				'github' => [
					// register your app here: https://github.com/settings/applications
					'class' => 'nodge\eauth\services\GitHubOAuth2Service',
					'clientId' => '...',
					'clientSecret' => '...',
				],
				'live' => [
					// register your app here: https://account.live.com/developers/applications/index
					'class' => 'nodge\eauth\services\LiveOAuth2Service',
					'clientId' => '...',
					'clientSecret' => '...',
				],
				'steam' => [
					'class' => 'nodge\eauth\services\SteamOpenIDService',
					//'realm' => '*.example.org', // your domain, can be with wildcard to authenticate on subdomains.
					'apiKey' => '...', // Optional. You can get it here: https://steamcommunity.com/dev/apikey
				],
				'instagram' => [
					// register your app here: https://instagram.com/developer/register/
					'class' => 'nodge\eauth\services\InstagramOAuth2Service',
					'clientId' => '...',
					'clientSecret' => '...',
				],
				'vkontakte' => [
					// register your app here: https://vk.com/editapp?act=create&site=1
					'class' => 'nodge\eauth\services\VKontakteOAuth2Service',
					'clientId' => '...',
					'clientSecret' => '...',
				],
				'mailru' => [
					// register your app here: http://api.mail.ru/sites/my/add
					'class' => 'nodge\eauth\services\MailruOAuth2Service',
					'clientId' => '...',
					'clientSecret' => '...',
				],
				'odnoklassniki' => [
					// register your app here: http://dev.odnoklassniki.ru/wiki/pages/viewpage.action?pageId=13992188
					// ... or here: http://www.odnoklassniki.ru/dk?st.cmd=appsInfoMyDevList&st._aid=Apps_Info_MyDev
					'class' => 'nodge\eauth\services\OdnoklassnikiOAuth2Service',
					'clientId' => '...',
					'clientSecret' => '...',
					'clientPublic' => '...',
					'title' => 'Odnoklas.',
					],
			],
		],
		
		'i18n' => [
			'translations' => [
				'eauth' => [
					'class' => 'yii\i18n\PhpMessageSource',
					'basePath' => '@eauth/messages',
				],
			],
		],

		// (optionally) you can configure pretty urls
		'urlManager' => [
			'enablePrettyUrl' => true,
			'showScriptName' => false,
			'rules' => [
				'login/<service:google|facebook|etc>' => 'site/login',
			],
		],

		// (optionally) you can configure logging
		'log' => [
			'targets' => [
				[
					'class' => 'yii\log\FileTarget',
					'logFile' => '@app/runtime/logs/eauth.log',
					'categories' => ['nodge\eauth\*'],
					'logVars' => [],
				],
			],
		],
		...
	],
...

User model

You need to modify your User model to login with EAuth services. Example from demo project:

<?php
...
	/**
	 * @var array EAuth attributes
	 */
	public $profile;

	public static function findIdentity($id) {
		if (Yii::$app->getSession()->has('user-'.$id)) {
			return new self(Yii::$app->getSession()->get('user-'.$id));
		}
		else {
			return isset(self::$users[$id]) ? new self(self::$users[$id]) : null;
		}
	}

	/**
	 * @param \nodge\eauth\ServiceBase $service
	 * @return User
	 * @throws ErrorException
	 */
	public static function findByEAuth($service) {
		if (!$service->getIsAuthenticated()) {
			throw new ErrorException('EAuth user should be authenticated before creating identity.');
		}

		$id = $service->getServiceName().'-'.$service->getId();
		$attributes = [
			'id' => $id,
			'username' => $service->getAttribute('name'),
			'authKey' => md5($id),
			'profile' => $service->getAttributes(),
		];
		$attributes['profile']['service'] = $service->getServiceName();
		Yii::$app->getSession()->set('user-'.$id, $attributes);
		return new self($attributes);
	}
...

Then you can access to EAuth attributes through:

<?php
	$identity = Yii::$app->getUser()->getIdentity();
	if (isset($identity->profile)) {
		VarDumper::dump($identity->profile, 10, true);
	}

Controller

Attach OpenID Controller behavior to disable CSRF validation for OpenID callbacks. Or you can disable CSRF validation by yourself.

<?php
...
	public function behaviors() {
				return [
					'eauth' => [
						// required to disable csrf validation on OpenID requests
						'class' => \nodge\eauth\openid\ControllerBehavior::className(),
						'only' => ['login'],
					],
				];
			}
...

Add the following to your Login action:

<?php
...
	public function actionLogin() {
		$serviceName = Yii::$app->getRequest()->getQueryParam('service');
		if (isset($serviceName)) {
			/** @var $eauth \nodge\eauth\ServiceBase */
			$eauth = Yii::$app->get('eauth')->getIdentity($serviceName);
			$eauth->setRedirectUrl(Yii::$app->getUser()->getReturnUrl());
			$eauth->setCancelUrl(Yii::$app->getUrlManager()->createAbsoluteUrl('site/login'));

			try {
				if ($eauth->authenticate()) {
//					var_dump($eauth->getIsAuthenticated(), $eauth->getAttributes()); exit;

					$identity = User::findByEAuth($eauth);
					Yii::$app->getUser()->login($identity);

					// special redirect with closing popup window
					$eauth->redirect();
				}
				else {
					// close popup window and redirect to cancelUrl
					$eauth->cancel();
				}
			}
			catch (\nodge\eauth\ErrorException $e) {
				// save error to show it later
				Yii::$app->getSession()->setFlash('error', 'EAuthException: '.$e->getMessage());

				// close popup window and redirect to cancelUrl
//				$eauth->cancel();
				$eauth->redirect($eauth->getCancelUrl());
			}
		}

		// default authorization code through login/password ..
	}
...

View

...
<?php
	if (Yii::$app->getSession()->hasFlash('error')) {
		echo '<div class="alert alert-danger">'.Yii::$app->getSession()->getFlash('error').'</div>';
	}
?>
...
<p class="lead">Do you already have an account on one of these sites? Click the logo to log in with it here:</p>
<?php echo \nodge\eauth\Widget::widget(['action' => 'site/login']); ?>
...

Extending

To receive all the necessary data to your application, you can override the base class of any provider. Base classes are stored in @eauth/src/services. Examples of extended classes can be found in @eauth/src/services/extended/.

After overriding the base class, you need to update your configuration file with a new class name.

Working with OAuth API

You can extend base classes with necessary methods and then write something like this:

<?php
	/** @var $eauth EAuthServiceBase */
	$eauth = Yii::$app->eauth->getIdentity('facebook');

	// to get protected resources user should be authenticated:
	if ($eauth->getIsAuthenticated()) {
		$eauth->callProtectedApiMethod();
		$eauth->callAnotherProtectedApiMethod();
	}

	// or you can get public resources at any time:
	$eauth->callPublicApiMethod();
	$eauth->callAnotherPublicApiMethod();

Example of an API call method:

<?php
	class FacebookOAuth2Service extends \nodge\eauth\services\FacebookOAuth2Service
	{
		public function fooApiMethod($bar) {
			$api_method = 'me'; // ex. for Facebook this results to https://graph.facebook.com/me

			// get protected resource
			$response = $this->makeSignedRequest($api_method, [
				'query' => [ 'foo' => 'bar' ], // GET arguments
				'data' => [ 'foo' => 'bar' ], // POST arguments
				'headers' => [ 'X-Foo' => 'bar' ], // Extra HTTP headers
			]);

			// you can get public resources with the same API:
			//$response = $this->makeRequest($api_method, $options);

			// process $response
			$data = process($response);

			// return results
			return $data;
		}
	}

API calls are performed if the current user has a valid access token (saved during the authentication). You can save access_token to your database by using custom token storage in your config:

<?php
...
	'components' => [
		'eauth' => [
			'class' => 'nodge\eauth\EAuth',
			'tokenStorage' => [
				'class' => '@app\eauth\DatabaseTokenStorage',
			],
		],
		...
	],
...

Translation

To use translations, add the following in your config:

<?php
...
	'components' => [
		'i18n' => [
			'translations' => [
				'eauth' => [
					'class' => 'yii\i18n\PhpMessageSource',
					'basePath' => '@eauth/messages',
				],
			],
		],
		...
	],
...

Available translations can be found in @eauth/src/messages.

License

The extension was released under the New BSD License, so you'll find the latest version on GitHub.

yii2-eauth's People

Contributors

akkez avatar borales avatar ghitu avatar gianbarp avatar ivokund avatar mike-kramer avatar mipapo avatar nodge avatar pauchai avatar vismutx avatar wadeshuler avatar zckri avatar zhandoskz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yii2-eauth's Issues

Facebook

Facebook doesn't return "link" for some reason, so
services/FacebookOAuth2Service.php:55 can be patched as:

-$this->attributes['url'] = $info['link'];
+$this->attributes['url'] = "https://www.facebook.com/".$info['id'];

How to get full info of this extension

Hi Nodge!

I'm using Yii2-eauth extension, but when I try to login with facebook, I just get the name and id info. Even thought I input some value into scope like this
protected $scopes = array(
self::SCOPE_EMAIL,
self::SCOPE_USER_BIRTHDAY,
self::SCOPE_USER_HOMETOWN,
self::SCOPE_USER_LOCATION,
self::SCOPE_USER_PHOTOS
);
But nothing change :(.
I'm using this function to get info: $this->makeSignedRequest('me');

Please help me show all the info of this extension.

Thank you so much!
Jason

login by facebook

i am using yii2-eauth, but it has an error:
array(1) { ["{"error":{"message":"Error_validating_verification_code__Please_make_sure_your_redirect_uri_is_identical_to_the_one_you_used_in_the_OAuth_dialog_request","type":"OAuthException","code":100}}"]=> string(0) "" }

Linkedin OAuth1 - Undefined index: oauth_token

Hi all,

I can't get LinkedIn connect working, it was working perfectly one month ago.
its weird i didn't touch the code, is it deprecated or something.

P.S
eauth2 for LinkedIn is broken with the Error message "Bad Redirect URI", you can find the same error on the demo page.

Please Help
Thanks

Twitter authorization problem

Even if I close popup window or do not authorize in Twitter in that window EAuth thinks I have logged in successfully.

Required fields therefore do not fill up.
Trouble is in OAuth module probably, but on EAuth side we can double check these.

Thanks.

Class nodge\eauth\oauth\SessionTokenStorage contains 5 abstract methods

Hi, i have a problem with authentication via OAuth

Class nodge\eauth\oauth\SessionTokenStorage contains 5 abstract methods and must therefore be declared abstract or implement the remaining methods (OAuth\Common\Storage\TokenStorageInterface::storeAuthorizationState, OAuth\Common\Storage\TokenStorageInterface::hasAuthorizationState, OAuth\Common\Storage\TokenStorageInterface::retrieveAuthorizationState, ...)

README.md

Had issues with your README.md. First in the controller section it says to add the behavior to the controller. Are we to assume it is the SiteController? I added it here hoping it was correct. The other issue is installing on the Basic Template of Yii2 I found that after install of the extension it had error looking for messages. It is required to implement the Translation section to your config as mentioned in the document. Please mention this.

ControllerBehavior not working..

Hello,
i use your eauth and all is working, but i call /login?service=facebook and this is a normally login page. I added this into my behavior:

            'eauth' => [
            'class' => \nodge\eauth\openid\ControllerBehavior::className(),
                'only' => ['login', 'login2'],
            ],

They does not work..

$oauthService->setScope error

Hi.

Looks like you have an excess letter 's' in file \nodge\yii2-eauth\src on line 135:

132    if (array_key_exists($key, $constants)) {
133        $resolvedScopes[] = $constants[$key];
134    } else {
135        $resolvedScopes[] = $scopes;
136    }

Doesn`t it have to be:

    if (array_key_exists($key, $constants)) {
        $resolvedScopes[] = $constants[$key];
    } else {
        $resolvedScopes[] = $scope;
    }

?
Best, Petr.

Does social login/register work on localhost?

Might be a bit of a noob question but does social login/register work on MAMP localhost?

Currently I have it setup for twitter google and facebook neither of them work.

Twitter I get - EAuthException: Error in retrieving token.
Facebook I get - Setting read-only property: common\models\User::authKey
Google I get - Error: redirect_uri_mismatch

Update I forgot to add

public $authKey;

google oauth returns no response

Hi i'am trying to use google oauth2 and when pop up comes out i click on allow app to access my info and after that i get no response.

Replace array() with []

Since Yii 2 requires PHP >= 5.4 I think it's better replace array() declaration with shorter option [].

TokenDefaultLifetime is misinterpreted in ServiceProxy

[ServiceProxy.php:165] $token->setLifetime($this->service->getTokenDefaultLifetime());

The default value for $tokenDefaultLifetime in ServiceBase is TokenInterface::EOL_UNKNOWN=-9001.
This value can be returned by $this->service->getTokenDefaultLifetime().

If this value is passed to $token->setLifetime, the end of life will be set by
[AbstractToken.php:108]: $this->endOfLife = intval($lifetime) + time();
which will be time()-9001, which is wrong.

I've faced this issue with facebook authentication recently.

It can be fixed by several ways:

  • by changing logic around ServiceProxy.php:165
  • by changing logic of AbstractToken::setLifetime (but it different package)
  • by changing default value of $tokenDefaultLifetime to zero

It is hard to say which one is preferred.

Return id is not right. Please help.

app\models\User Object ( [id] => yahoo-https://open.login.yahooapis.com/openid20/user_profile/xrds [username] => Kevin Troy Lumandas [password] => [authKey] => c34df095cc61709f46fe5c71c68d232b [profile] => Array ( [id] => https://open.login.yahooapis.com/openid20/user_profile/xrds [name] => Kevin Troy Lumandas [service] => yahoo ) )

//this one. how can i fix this sir/mam/ Thanks in advance.
[id] => yahoo-https://open.login.yahooapis.com/openid20/user_profile/xrds

\yii\base\Extension removed

Seems like \yii\base\Extension does not exist anymore, so class Extension extends \yii\base\Extension throws an error.

Facebook Login - Access Denied

Hi, Facebook was working perfectly and suddenly i can't login via Facebook, i got the error message
" protected 'errorAccessDeniedCode' => string 'access_denied'", how can i fix that ?

Thanks

yii2 get full data/response from service

Great extension by the way.

I was wondering in the demo project the data/response you get after logging in is greater than what I get.

For example the only data I get is id, name, url and service.

For example facebook on the demo you receive everything education, email, DOB etc

Undefined index: sex

/nodge/eauth/services/VKontakteOAuth2Service.php at line 58

$this->attributes['gender'] = $info['sex'] == 1 ? 'F' : 'M';

Да вообще надо проверять все info :)

Unable to work properly without service name in return URL path

I have one return url in all services: <domain>/login.

EAuth works right only if return URL is /login/<service name>.
Otherwise (when using GET parameter for /login?service=<service name>) popup window doesn’t close and just redirects to /login page.
Services trim all GET params off (including service name) or something like that.

Can we have it done without new URL management rules and changing return URL on all services?

When creating Google API Client ID, what should redirect URI be?

I am trying to get this working, but not having any luck.

I've created a Google Client ID, where I get the Client ID, Secret etc. What should the redirect URI value be?

I've tried various things, but clicking on the Google connect button on my login page results in a popup with Page not found error.

Edit: Figured it out, but it may be nice to make some mention of it in the documentation. e.g. Set the Redirect URI to your login page.

Class constructor doesn’t match its parent’s interface

ServiceProxy extends AbstractService.
But AbstractService implements ServiceInterface.

Therefore while working with composer (zipball is rather okay) we get an error:

Declaration of yii\eauth\oauth2\ServiceProxy::__construct() must be compatible with OAuth\OAuth2\Service\ServiceInterface::__construct(OAuth\Common\Consumer\CredentialsInterface $credentials, OAuth\Common\Http\Client\ClientInterface $httpClient, OAuth\Common\Storage\TokenStorageInterface $storage, $scopes = Array, OAuth\Common\Http\Uri\UriInterface $baseApiUri = NULL)

Also, when installing demo app through composer the same error throws.
That’s why demo app (which doesn’t have vendors at all) won’t work out of the box.

WidgetAssetBundle.php gets published under a web-accessible directory

WidgetAssetBundle.php can be accessed through a web-browser (something like "/assets/f393d140/WidgetAssetBundle.php").
If the server shows errors, it'll show something like this:
Fatal error: Class 'yii\web\AssetBundle' not found in /var/www/site/web/assets/f393d140/WidgetAssetBundle.php on line 17
Basically WidgetAssetBundle.php publishes itself.
To eliminate the error, the WidgetAssetBundle.php file must be moved out of the assets directory.

SessionTokenStorage class

SessionTokenStorage class must implement these methods:
public function storeAuthorizationState($service, $state) public function hasAuthorizationState($service) public function retrieveAuthorizationState($service) public function clearAuthorizationState($service) public function clearAllAuthorizationStates()

As I understand, \OAuth\Common\Storage\TokenStorageInterface interface was updated and enhanced with such methods

How to custom scope

Hi, I want to get email from Google oauth2 but don't know how to achieve it.

May you help me?

Thank you very much.

get an email google_oauth

I extended fetch_attributes with
$this->attributes['email'] = $info['email'];

Still this returns an empty email
Any ideas what am I doing wrong ?

How do you change the redirect URI in the request

I am trying to use this extension with Google OAuth2, but I get this error:

Error: redirect_uri_mismatch

I want to know, where do I specify the redirection url so I can put one that my Google Application actually allows?

I have tried with setRedirectUrl(Url::to(['site/validUrl']), but it still redirects me to the site/login page.

Is there a way I can specify the redirect url after the login?

LDAP Auth?

Hi, I know it's not really OAUTH topic, but for easy auth - it would be cool, to integrate an ldap auth method too?! I have a small running version based upon zends ldap class, maybe it's an option?

Namespace format

I saw you're using yii\eauth\EAuth as a namespace and class.
But I'd say nodge\auth\Auth would be more appropriate.

You shouldn't use yii in your namespace since it's for the framework.
Furthermore you don't need to prefix your classes with E anymore, since we've namespaces now.

I know that there are no guidelines for Yii2 extensions available yet, so maybe this is still subject to discussion. But I thought: Better come up early with this :)

Geting error when changing scope

Hi, i got the error: Array to string conversion, when tryed to change scope VKontakte service. There is my code:

$eauth = Yii::$app->get('eauth')->getIdentity('vkontakte');
$eauth->setScope(Vkontakte::SCOPE_EMAIL);

No matching package found

  • Installation request for nodge/yii2-eauth 2.2.1 -> satisfiable by nodge/yii2-eauth[2.2.1].
  • nodge/yii2-eauth 2.2.1 requires yiisoft/yii2 dev-master@dev -> no matching package found.

I meet problem with SSL

Hi, please help me get out this problem:
I'm using Xampp (already enable extension=php_curl.dll) and using composer to add
"nodge/yii2-eauth": "~2.0"
After that, I run: composer update, all thing done.
But when run with oauth2 (Google), I got this problem:
EAuthException: cURL Error # 60: SSL certificate problem: unable to get local issuer certificate

Please help me know how to solve it?

Thank you very much.

Callback URL

/**
* @return string the current url
*/
protected function getCallbackUrl() {
$service = Yii::$app->getRequest()->getQueryParam('service');
$url = Url::to(['', 'service' => $service], true);
return $url;
}

If current URL was with some extra params except service, they are will be ignored after redirect.

I think we have bug here.

Api calls that not requires access token

Ho to use your library as service adaptor for social networks with abbility run public methods api?

When user i not logged it and did not provide access token.
Thanks.

facebook deprecated

When login via facebook I catch an error:

You must upgrade this app to Graph API v2.x
v1.0 will be deprecated on April 30, 2015
Learn how to upgrade

please, fix this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.