Andrew Wayne wrote on Sunday 13th of November 2011:I'm not getting any errors using your code, must be something else in your environment, try do a Warden::logout(true) then logging in again
Andrew Wayne wrote on Tuesday 1st of November 2011:I realize this should be explained better in the docs i'll add a better example for this.
In your warden config file in the omniauthable section you should have in_use => true,
then depending on your settings in the config files, you need to add a controller class Controller_Auth extends Controller_OmniAuth {}
and add auth to your routes. The same way you would use Fuel NinjAuth package https://github.com/philsturgeon/fuel-ninjauth but you should already have a services table in your database, the example schema is in 'config/install.sql' or you can use oil to add the table to your db with 'php oil r warden --omniauthable' there's an example view file included in 'views/register.php'
Good catch! Here's the next barrier... ErrorException [ Error ]: Class 'OAuth2\Exception' not foundAndrew Wayne wrote on Thursday 3rd of November 2011:this was actually a typo which caused this error, fixed it now thanks.. In 'warden/classes/warden/omniauth/strategy/oauth2.php' you need to change line 24, the class 'OmniAuth_Strategy_OAuth2' should actually extend 'OmniAuth_Strategy' not 'Strategy' so line 24 should be: class OmniAuth_Strategy_OAuth2 extends OmniAuth_Strategy You can see it here https://github.com/dre1080/warden/commit/be60a49dd2919be81228e6238f6d63a1a6e760d5
php oil r warden -p
Warden installed successfully!
php oil r warden -c
Setting up Warden config... Error - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists with query: "CREATE TABLE `users`...
php oil r warden help
php oil r warden -p -l
php oil r warden:uninstall
php oil r warden:feature -c
Andrew Wayne wrote on Thursday 3rd of November 2011:That one's actually a bug with the fuel-oauth2 package I think.. On line 12 the class is extending from global php Exception class but not taking the namespace into account. So line 12 of that file should actually be: class Exception extends \Exception { Notice the backslash
Andrew Wayne wrote on Thursday 3rd of November 2011:What provider are you trying to use? Facebook?
Seems like you haven't included the client_id, in warden config, omniauthable => providers => facebook => id
Andrew Wayne wrote on Thursday 3rd of November 2011:I think you don't have the php curl extension installed, thats why php isn't recognizing the curl functions or curl constants
check your php.ini or try phpinfo() to see if curl is installed
public function action_index() { $val = Login::validate_form('form_login'); Debug::dump(Warden::check()); if (Input::method() == 'POST') { if ($val->run()) { $email = trim($val->validated('logEmail')); if (Login::is_confirmed($email)) { $password = trim($val->validated('logPassword')); $remember = !is_null($val->validated('logRemember')) ? true : false; Debug::dump(Warden::authenticate_user($email, $password, $remember)); } else { Session::set_flash('notice', 'You are not registred, please register first!'); } } else { Session::set_flash('notice', $val->errors()); } } $this->template->title = "Login"; $this->template->content = View::forge('user/index') ->set('val', $val, false); }
Warning - 2011-11-30 10:51:56 --> Fuel\Core\Fuel::init - The configured locale en_US is not installed on your system.
It looks like you're new here. If you want to get involved, click one of these buttons!