SteemConnect provider for HybridAuth
HybridAuth
HybridAuth enable developers to easily build social applications to engage websites vistors and customers on a social level by implementing social signin, social sharing, users profiles, friends list, activities stream, status updates and more.
HybridAuth goal is to act as an abstract api between your application and various social apis and identities providers such as Facebook, Twitter and Google.
HybridAuth has 30+ providers and 20+ plugins/add-ons. Its also downloaded 800k until now.
Usage
Install HybridAuth
composer install hybridauth/hybridauth
The authenticate() method redirects you to steemconnect service to get access_token if user doesnt have one already.
<?php
require_once 'vendor/autoload.php';
$config = [
'callback' => 'http://myawesomeapp.com/redirect/steemconnect',
'keys' => [ 'id' => 'fornaxstudio', 'secret' => 'top_secret']
];
try {
$steem = new Hybridauth\Provider\SteemConnect($config);
$steem->authenticate();
$userProfile = $steem->getUserProfile();
print_r($userProfile);
}
catch(\Exception $e){
echo 'Oops, we ran into an issue! ' . $e->getMessage();
}
Hint: by default, secret is mandatory on hybridauth for some other providers. You may pass it a string.
The redirected page;
After user gives permission, it will redirect you to;
http://myawesomeapp.com/redirect/steemconnect?access_token=USERSACCESSTOKEN
Apply your logic here :)
Check the hybridauth documentation.
PR Url;
https://github.com/hybridauth/hybridauth/pull/917
Proof of Work
Posted on Utopian.io - Rewarding Open Source Contributors
Leave SteemConnect provider for HybridAuth to:
Read more #utopian-io posts
Best Posts From bencagri
We have not curated any of bencagri's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From bencagri
- Python Frameworks Comparison
- DNGO Assistant - Introducing Kali
- Book Cover Creator for DNGO
- Cem Karaca - Lets Go!
- Aurora - An Article Project with Symfony 4 and Domain Driven Design
- Trip Fairground - Turkish Psych Rock
- Is this a bug?
- SteemConnect provider for HybridAuth
- PhotonBundle for Symfony
- Php image acceleration and modification - Photon