arckinteractive/elgg_hybridauth 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

arckinteractive/elgg_hybridauth

Composer 安装命令:

composer require arckinteractive/elgg_hybridauth

包简介

HybridAuth Integration for Elgg

README 文档

README

Elgg 2.3

elgg_hybridauth is an authentication tool that allows users to create new Elgg accounts using their social media accounts.

Providers included by default:

  • AOL
  • Facebook
  • Foursquare
  • Google
  • LinkedIn
  • Live
  • MySpace
  • OpenID
  • Twitter
  • Yahoo

Visit http://hybridauth.sourceforge.net/ for more information about HybridAuth library and additional providers that can be added to this distribution.

Features

  • Allows a single Elgg profile to be connected to multiple provider accounts
  • Follows Elgg's native registration workflow
  • Allows users to authorize / deauthorize providers in their account settings
  • Optionally, allows administrators to import user settings from elgg_social_login and social_connect
  • Provides an interface to configure permissions scopes for each provider

Upgrades

  • When upgrading, disable the plugin first, upload the updated plugin files, and reenable for updated settings to take effect

Provider Setup

Setting up Facebook

Setting up Twitter

Setting up Google

Setting up LinkedIn

  • Go to https://www.linkedin.com/secure/developer
  • Create new application

    In OAuth User Agreement, update the default scope to your needs. If you are unsure, check r_basicprofile, r_emailaddress, rw_nus and r_network You do not need to fill out redirect URLs

  • Copy the API Key into the Public Key field in the plugin settings
  • Copy the Secret Key into the Private Key field in the plugin settings

Setting up Yahoo!

Set up Live

Set up FourSquare

Developer Notes

Since 1.1.1, you can make use of 'hybridauth:authenticate', $provider plugin hook to perform some actions, when the user is authenticated with a provider. This might be a good place to post stuff to user's wall or to grab a profile picture.

Example of how to post to the user's wall that the user Joined the site:

// do stuff when the user is authenticated with one of the providers
elgg_register_plugin_hook_handler('hybridauth:authenticate', 'all', 'elgg_hybridauth_on_authenticate');

function elgg_hybridauth_on_authenticate($hook, $provider, $return, $params) {

	$user = elgg_extract('entity', $params);

	try {
		$ha = new ElggHybridAuth();
		$adapter = $ha->getAdapter($provider);
		if ($adapter->isUserConnected()) {
			$status = $user->name . ' just joined ' . elgg_get_config('sitename') . ' at ' . elgg_get_site_url();
			$adapter->setUserStatus($status);
		}
	} catch (Exception $e) {
		// Something is wrong
	}
}

Upgrading

To 1.3

  • For performance reasons, HYBRIDAUTH_PUBLIC_AUTH is not longer defined. Call elgg_get_plugin_setting('public_auth', 'elgg_hybridauth') where needed.

  • base_url and debug_file are no longer set via plugin settings. They are set dynamically using current installation path and wwwroot.

  • Due to recent changes in LinkedIn scopes, HybridAuth was producing unreliable results. HA LinkedIn class and LinkedIn wrapper were replaced with custom implementation for the sake of stability. https://developer.linkedin.com/support/developer-program-transition

统计信息

  • 总下载量: 219
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 10
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2014-05-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固