ikkez / f3-opauth Goto Github PK
View Code? Open in Web Editor NEWOpauth Plugin for PHP Fat-Free Framework
License: GNU General Public License v3.0
Opauth Plugin for PHP Fat-Free Framework
License: GNU General Public License v3.0
When I try to run this plugin, I get the following error:
[10-Jun-2016 13:39:45 UTC] PHP Fatal error: Class 'Prefab' not found in /home/deje/public_html/writers-tryst-test/php/f3-oauth/OpauthBridge.php on line 18
[10-Jun-2016 13:39:45 UTC] PHP Stack trace:
[10-Jun-2016 13:39:45 UTC] PHP 1. {main}() /home/deje/public_html/writers-tryst-test/index.php:0
[10-Jun-2016 13:39:45 UTC] PHP 2. require() /home/deje/public_html/writers-tryst-test/index.php:2
I am a PHP newbie and find your plugin interesting but the documentation a bit sparse for my level of understanding. Where does the $f3->set('AUTOLOAD','lib/opauth/'); get called from?�
My index.php file (in the same folder as opauth.ini) looks like:
config('opauth.ini', TRUE); // init with config $opauth = OpauthBridge::instance($f3->opauth); // define login handler $opauth->onSuccess( function($data){ header('Content-Type: text'); echo 'User successfully authenticated.'."\n"; print_r($data['info']); }); // define error handler $opauth->onAbort(function($data){ header('Content-Type: text'); echo 'Auth request was canceled.'."\n"; print_r($data); }); ?>but I get the error:
The writers-tryst-test.ron-tornambe.com page isn’t working
My URL is "http://writers-tryst-test.ron-tornambe.com/opauth/index.php"
TIA
Ron
I tried to get the data. But it not work for me.
my index
$opauth = OpauthBridge::instance($f3->opauth);
$opauth->onSuccess('Authentication->social');
authentication.php
function social() {
$opauth = new OpauthBridge($this->opauth);
$opauth->onSuccess(function($data){
$user = new User($this->db);
$user->getbyEmail($data['info']['email']);
if($user->dry()) {
echo "Not registered";
}
});
}
While testing my code with php 8.2 I found this one:
NOTICE: PHP message: Creation of dynamic property Opauth::$Strategy is deprecated
NOTICE: PHP message: [/var/www/geokrety/vendor/ikkez/f3-opauth/lib/opauth/Opauth.php:112]
NOTICE: PHP message: [/var/www/geokrety/vendor/sentry/sentry/src/ErrorHandler.php:305] Base->{closure}()
NOTICE: PHP message: [/var/www/geokrety/vendor/ikkez/f3-opauth/lib/opauth/Opauth.php:112] Sentry\ErrorHandler->handleError()
NOTICE: PHP message: [/var/www/geokrety/vendor/ikkez/f3-opauth/lib/opauth/Opauth.php:88] Opauth->run()
NOTICE: PHP message: [/var/www/geokrety/vendor/ikkez/f3-opauth/lib/opauth/OpauthBridge.php:44] Opauth->__construct()
NOTICE: PHP message: [/var/www/geokrety/vendor/bcosca/fatfree-core/base.php:1997] OpauthBridge->auth()
NOTICE: PHP message: [/var/www/geokrety/vendor/bcosca/fatfree-core/base.php:1795] Base->call()
NOTICE: PHP message: [geokrety.php:117] Base->run()
Hi ikkez,
I'd like to get a refresh token when connecting threw google for example (https://developers.google.com/identity/protocols/OpenIDConnect). Is this possible with your library ?
Best,
Tin
The READ.ME is too sketchy for anyone to successfully implement this plugin. It is missing the $f3-run() command and does not fully explain how to authenticate any strategy. The Facebook demo is inoperative. A working example would be very helpful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.