i want user to get login with facebook but it should alos allow use to login with the normal login that is provide my the system, can u integrate both the auth and oauth that is ninja authtication at the same time ,
how to do it ? can i extend both the class at the same time
The OAuth implementation (Opauth) that is part of the Auth package is fully integrated with both Simpleauth and Ormauth.
The Opauth implementation is compatible with Ninjaauth. You should not use the old Ninjauth package, it is no longer compatible with the current Fuel release.
It works very similar as well. When you login through OAuth, you have the option of either have them create a local account too, link the OAuth login to an existing local account, or have the system create a dummy local account automatically. This local account is then used through Ormauth or Simpleauth like any other local account.
their is one more think , their are two different panel one is customer panel & behind that their is an admin panel now i trying to create a different login for both of then can i create two different table user and admin table, and provide with two different auth file ,
and if i use
list($driver, $user_id) = Auth::get_user_id();
$this->current_user = Model_User::find($user_id);
it default check which table user table i.r users table , can i change the table preference and check the new table for login
Your Ormauth config file tells you which db connection needs to be used, and which table name is used for users. This is also used as prefix for the other Ormauth tables.
So there are two options: you can use two different db connection (an entry in your db.php, either to a different database, or to the same database but with a configured table prefix), or with a different user table in the same database.
You can just update the config file from your controller, just make sure you do it before you access the Auth classes: