Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
using both simpleauth and ninjauth
  • The application I'm building needs to support both SSO (twitter, facebook, google) and a vanilla email/password account system. So I'm trying to use both the NinjAuth and SimpleAuth drivers for those two purposes. I followed the instructions for NinjaAuth, which were very helpful : http://philsturgeon.co.uk/blog/2011/09/ninjauth-social-integration-php. I have it working nicely. But I'm getting a little confused about how to use multiple auth drivers. Specifically, it seems like I can't have any functions inside my auth controller which extends
    NinjAuth\Controller. If I do, NinjAuth breaks. Does it have to be empty to work or am I maybe doing something wrong? (I've also asked this on Phil Sturgeon's blog, but thought I might get help here more quickly). That's the micro question. The marco question is generally, how does one use multiple auth drivers? Will I end up needed two auth controllers - one that simply extends NinjAuth and one that works with SimpleAuth? That doesn't seem very elegant - it'd be better to have one auth controller - so I'm sure I'm probably missing something! Thanks very much for any help!
  • awesome. this is exactly what i was looking for. Thank you very much!
  • I'm almost embarrassed to say this, but in case anyone else is having similar trouble, I'll let you know what fixed it for me. It became obvious once I realized it, but ninjauth is NOT an auth driver - it's a package. So don't list it as a driver in your auth config! Whoopsies. :)
  • Hey dude, did you ever get this working?
    I'm struggling with getting a vanilla registration working side by side with the ninjauth. I guess i could write a complete separate registration for the non social part, but i'd rather not. you think you can give me some tipps, or show me what you did to make it both work? that'd help me a great deal.
    thanks.
  • You could have a look at http://github.com/fuel/depot, it has a working auth+ninjauth combo.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion