GithubHelp home page GithubHelp logo

modx-hybridauth's Introduction

HybridAuth for MODX Revolution

Component for login through 3rd party services.

HybridAuth

HybridAuth enables developers to easily build social applications and tools to engage websites vistors and customers on a social level by implementing social sign-in, social sharing, users profiles, friends list, activities stream, status updates and more.

The main goal of HybridAuth is to act as an abstract API between your application and various social apis and identities providers such as Facebook, Twitter, MySpace and Google.

Repository

HybridAuth repository is made up of several projects:

  • HybridAuth Core library includes OpenID, Facebook, Twitter, LinkedIn, MySpace, Google, Yahoo, Windows Live, Foursquare and AOL.
  • The additional providers project contains many others services which you may want to use,
  • Examples and demos contains five working examples for you to test,

Getting Started

We highly recommend that you download and use the latest release from HybridAuth website at http://hybridauth.sourceforge.net/download.html

You can find complete documentation for HybridAuth at http://hybridauth.sourceforge.net

modx-hybridauth's People

Contributors

argnist avatar bezumkin avatar biz87 avatar bournwog avatar c1ean avatar ershov-ilya avatar evd avatar grachov avatar kookabura avatar mattersj avatar vanchelo avatar viktorminator avatar wax100 avatar webinmd avatar

Stargazers

 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

modx-hybridauth's Issues

Не удаляется системная настройка

После полного удаления пакета лог переполняется сообщениями

[2013-05-13 21:05:11](ERROR @ /connectors/system/registry/register.php) Path specified for package hybridauth is not a valid or accessible directory: /home/sites/www/core/components/hybridauth/model/
[2013-05-13 21:05:38](ERROR @ /connectors/element/chunk.php) Path specified for package hybridauth is not a valid or accessible directory: /home/sites/www/core/components/hybridauth/model/
[2013-05-13 21:05:39](ERROR @ /connectors/element/propertyset.php) Path specified for package hybridauth is not a valid or accessible directory: /home/sites/www/core/components/hybridauth/model/
[2013-05-13 21:05:40](ERROR @ /connectors/system/errorlog.php) Path specified for package hybridauth is not a valid or accessible directory: /home/sites/www/core/components/hybridauth/model/

всё изза того что системная настройка "extension_packages" содержит этот самый путь: [{"tickets":{"path":"[[++core_path]]components/tickets/model/"}},{"hybridauth ":{"path":"[[++core_path]]components/hybridauth /model/"}}] и не удаляется пакетом самостоятельно.
Нужно добавить вызов метода removeExtensionPackage при удалении.

Сайт не в корне домена

Если сайт лежит не в корне домена, ссылки для авторизации генерируются не правильно. Мелочь, но все же.

core/components/hybridauth/model/hybridauth/hybridauth.class.php

у меня сайт лежит в http://dagestan.travel/test/ и я сделал так
/*
* Returns working url
*
* @return mixed $url
* */
function getUrl() {
$url = 'http://dagestan.travel/' . substr($_SERVER['REQUEST_URI'], 1);
//$url = $this->config['siteUrl'] . substr($_SERVER['REQUEST_URI'], 1);

extended-поля в сниппете haProfile

Как быть с extended-полями пользователя в параметре profileFields сниппета haProfile?

Как сделать разрешёнными все extended-поля, или только некоторые из них, например &profileFields=extended[myExtendedParam], extended[myExtendedParam2]``? Как исключить нежелательные к сохранению?

У Login есть сниппет UpdateProfile, в котором есть параметры: useExtended и excludeExtended. Может быть как-то по аналогии с ним?

Вход контексты

Если параметр addContexts не содержит контекста web - происходит беда, юзер никуда не логонится.

&addContexts=en,ru,de - находясь в любом из контекстов, не авторизируется в текущий контекст.
&addContexts=web,en,ru,de - авторизируется.

Wrong Facebook permissions

How to reproduce?

Follow the installation instructions as in http://docs.modx.pro/components/hybridauth/providers/facebook .
Try to login via Facebook.

Expected result

Successful login.

Real result

I see such Facebook message:

Invalid Scopes: read_stream, read_friendlists. This message is only shown to developers. Users of your app will ignore these permissions if present. Please read the documentation for valid permissions at: https://developers.facebook.com/docs/facebook-login/permissions

I am going to provide a pull-request, replacing those permissions to correct ones.

VK invalid_grant

Привет, давно такая ошибка... решил разобраться может.
В день по 20-30 раз бывает из 200.
Ругается на права... как понять почему, что исправить.

modx 2.5.2, php7-fpm, modx-hybridauth последний

в логах ошибка

[2016-11-18 16:34:27] (ERROR @ /var/www/***/www/core/components/hybridauth/model/hybridauth/hybridauth.class.php : 69) [HybridAuth] User profile request failed! Vkontakte returned an error: Exception: The Authorization Service has return: invalid_grant in /var/www/***/www/core/components/hybridauth/model/hybridauth/lib/thirdparty/OAuth/OAuth2Client.php:83
Stack trace:
#0 /var/www/***/www/core/components/hybridauth/model/hybridauth/lib/Providers/Vkontakte.php(72): OAuth2Client->authenticate('5900e69c1de5200...')
#1 /var/www/***/www/core/components/hybridauth/model/hybridauth/lib/Endpoint.php(176): Hybrid_Providers_Vkontakte->loginFinish()
#2 /var/www/***/www/core/components/hybridauth/model/hybridauth/lib/Endpoint.php(56): Hybrid_Endpoint::processAuthDone()
#3 /var/www/***/www/core/components/hybridauth/model/hybridauth/hybridauth.class.php(191): Hybrid_Endpoint::process()
#4 /var/www/***/www/core/cache/includes/elements/modplugin/1.include.cache.php(40): HybridAuth->processAuth()
#5 /var/www/***/www/core/model/modx/modscript.class.php(70): include('/var/www/***...')
#6 /var/www/***/www/core/model/modx/modx.class.php(1608): modScript->process()
#7 /var/www/***/www/core/model/modx/modrequest.class.php(69): modX->invokeEvent('OnHandleRequest')
#8 /var/www/***/www/core/model/modx/modx.class.php(1399): modRequest->handleRequest()
#9 /var/www/***/www/index.php(57): modX->handleRequest()
#10 {main}

и полно еще ошибок типа

[2016-11-18 21:41:16] (ERROR @ /var/www/***/www/core/components/hybridauth/model/hybridauth/hybridauth.class.php : 69) [HybridAuth] Oophs. Error!
[2016-11-18 21:41:17] (ERROR @ /var/www/***/www/core/components/hybridauth/model/hybridauth/hybridauth.class.php : 69) 

MODX 2.8.4 with PHP 8.1.5, 500 ERROR

Error message

500 ERROR, no page shown when right clicking to update user fields in manager.

Summary

I have broken down the problem to be with the "OnUserFormPrerender" in the HybridAuth plugin. When disabling this, the user edit field page is shown, but not the tab "Auth Providers".

Step to play

Upgraded from MODX 2.8.4 with PHP 7.4 to PHP 8.1.5.

Observed behavior

Generated tab "Auth Providers" in user user edit form in manager breaks everything. Resulting in a 500 ERROR.

Expected behavior

It should work as normal.

Environment

NGINX
PHP 8.1.5
MODX 8.2.4
Latest HybridAuth

Forgot to mention that it works nice with MODX 2.8.4 with PHP 7.4

Проблема с VK в урл

Приветь
Не могу настроит авторизацию через vk
id и secret указал в настройках но при выполнения скрипта в урл вместо моего id показывает 12345

https://oauth.vk.com/authorize?client_id=12345&

Если вместо 12345 поставит мой id то без проблем работает

На базе все показывает правилно

Данные из twitter

При авторизации через твиттер город указанный в профиле сохраняется в поле "Область" (state).

Odnoklassniki error

Сообщение об ошибке / Error message

Резюме / Summary

Есть две ошибки по провайдеру Одноклассники

  1. формат записи ключа должен быть следующим:
    {"keys":{"id":"123456787654","key":"UHGKLJOKLHGIJ","secret":"TVBUN35467"}}

  2. формат даты рождения не подходит, необходимо в файле изменить, иначе не может записать в базу (пытается в поле День с ограничением в 2 символа сохранить 4 символа года)

было:

 if ($data->get('birthday')) {
            $bday = explode('-', $data->get('birthday'));
            $userProfile->birthDay = (int)$bday[0];
            $userProfile->birthMonth = (int)$bday[1];
            $userProfile->birthYear = (int)$bday[2];
        }

стало:

 if ($data->get('birthday')) {
            $bday = explode('-', $data->get('birthday'));
            $userProfile->birthDay = (int)$bday[2];
            $userProfile->birthMonth = (int)$bday[1];
            $userProfile->birthYear = (int)$bday[0];
        }

Error: redirect_uri_mismatch

I have installed and set the redirect path in google api config.
/assets/components/hybridauth/action.php?hauth.done=Google

I got redirect_uri_mismatch error. I couldn't find the action.php on server under /assets/components/hybridauth/ folder. Instead there's connector.php file.

MODX dies after installing HybridAuth package

Bug report

Summary

MODX died after installing the HybridAuth package. At least none of the interface elements worked.

Step to reproduce

When installing the HybridAuth package via modx or modxpro, the installation console hangs. Then, after reloading the page, the following "Undefined array key" modUser "in E: \ OpenServer \ domains \ guidenwagen \ core \ vendor \ xpdo \ xpdo \ src \ xPDO \ xPDOMap.php on line 44" will pop up.

Observed behavior

All interface elements stop working. This error is present on all pages of the manager.

Expected behavior

The package should just install

Environment

Nginix_1.21
PHP_8.0
MySQL-5.7

Correction

switch to PHP_7.4

MODX Cloud Issue

Have installed hydridauth on discovermodx.com but since Cloud php upgrade this no longer works. Added to root /index.php the line:

ini_set('apc.cache_by_default', 0);

But this does not seem to work now.

Could not create table ha_user_services

Сообщение об ошибке / Error message

Резюме / Summary

ENGINE=InnoDB
FULLTEXT INDEX extended
The used table type doesn't support FULLTEXT indexes

Full sql text

Could not create table `***_ha_user_services` SQL: CREATE TABLE `modx_dS4_ha_user_services` (`id` INTEGER unsigned NOT NULL AUTO_INCREMENT, `internalKey` INT(10) unsigned NOT NULL, `identifier` VARCHAR(100) NOT NULL, `provider` VARCHAR(50) NOT NULL, `createdon` DATETIME NULL, `websiteurl` VARCHAR(255) NULL, `profileurl` VARCHAR(255) NULL, `photourl` VARCHAR(255) NULL, `displayname` VARCHAR(100) NULL, `description` TEXT NULL, `firstname` VARCHAR(100) NULL, `lastname` VARCHAR(100) NULL, `gender` VARCHAR(50) NULL, `language` VARCHAR(50) NULL, `age` TINYINT(3) NULL, `birthday` TINYINT(2) NULL, `birthmonth` TINYINT(2) NULL, `birthyear` SMALLINT(4) NULL, `email` VARCHAR(100) NULL, `emailverified` VARCHAR(100) NULL, `phone` VARCHAR(100) NULL, `address` VARCHAR(255) NULL, `country` VARCHAR(100) NULL, `region` VARCHAR(100) NULL, `city` VARCHAR(100) NULL, `zip` VARCHAR(25) NULL, `extended` TEXT NULL, PRIMARY KEY (`id`), UNIQUE INDEX `unique_fields` (`internalKey`,`provider`), FULLTEXT INDEX `extended` (`extended`)) ENGINE=InnoDB ERROR: Array ( [0] => HY000 [1] => 1214 [2] => The used table type doesn't support FULLTEXT indexes )

Multi-context auth

When added to a multi-context site, hybridauth only displays the buttons when the keys are added to the main system settings. If they are added to each context settings the icons do not show up.

MODX revo HybridAuth does not work with Twitter

Скажите пожалуйста, компонент вызывает авторизацию через твиттер, но при обратном вызове профиль не создается и авторизация не происходит

Can't login after logout

Lets imagine that we have one-page website.
When we have logout the site - we have redirecting to page with POST parameters like

http://your-site.com/?service=logout

Now if we don't refresh page and want to login to site again - your plugin after login makes redirect back to page http://your-site.com/?service=logout

I solve this problem, adding $arr = str_replace(["service=logout&", "?service=logout"], "", $arr); code to the end of HybridAuth snippet.
I suppose it is not actually right solution and so I decided not to do pull-request.

Ошибки в логе

Если обновлять профиль класса не haUser, то выдаёт ошибку

No foreign key definition for parentClass: modUser using relation alias: Services

LinkedIn Issues

Hi Vasiliy,

This is a really good component for MODx. I have installed it on a clean install and have configured Twitter, Facebook and Google ok but I can't get LinkedIn to work. Have you managed to get it working? If so which steps did you take to do it?

Проблема с Logout

После "Выйти"
[2013-01-21 12:00:07](ERROR @ /index.php) [HybridAuth] logout error. Username: xxxx, uid: 746. Message: not_logged_in
и не выходит(

Post Hooks?

Maybe it's possible, but I'm not seeing it. It would be nice to add post hooks to the oAuth sign up, so we can add other details about the sign up user. E.g. subscribe to newsletter.

Facebook provider doesn't work on sites with HTTPS

When I changed protocol to https I got a problem with Facebook login:
Facebook redirect me to my site and add to end of URL "#=".

In log:
"(ERROR @ /index.php) [HybridAuth] Authentication failed! Facebook returned an invalid user id."

With other providers no problems.

Update packaged readme

--------------------
HybridAuth
--------------------
Version: 1.0.0
Author: John Doe <[email protected]>
--------------------

A basic Extra for MODx Revolution.

Feel free to suggest ideas/improvements/bugs on GitHub:
http://github.com/username/HybridAuth/issues

Incorrect link generated

When using this for Google the the following snippet call
[[HybridAuth? &providers=Google]]

produces the following html

<html>
<head>
<title>Red Sledgehammer - Home</title>
<base href="http://redsledgehammer.handsworthchristianschool.co.uk/" />
</head>
<body>
You can authorize on site with: 
<a href="http://redsledgehammer.handsworthchristianschool.co.uk/favicon.ico?action=login&provider=Google">Google</a>

</body>
</html>

as you can see this is trying to link to favicon.ico and not the page it's self. This is on a fresh install of modx and hybridauth.

There are no errors being logged in the system logs

I have tried this with the other providers just in case it is just google and get the same issue.

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.