How can I use the Vanilla login cookie elsewhere?
Hello, I have a CRM-style application that I built from scratch in CodeIgniter, and I'd like my users to login through Vanilla to access it. I've done this in SMF previously -- I was able to read their SMF cookie, parse out the User ID and security token and verify it against the SMF tokens database, using the same logic SMF itself uses. Is there a similar way to do this with Vanilla? Or is there an easier way via the API or something?
Thanks for your help.
Best Answer
-
Linc Admin
@Wilson29thID I've bootstrapped Vanilla's framework into WordPress with this: https://github.com/lincolnwebs/Glue/tree/master/wp-content/plugins/glue That allows reading their Vanilla identity securely.
Might be helpful to reference. I'll caution it increases overhead quite a bit to double-load applications like that (loading all of Vanilla for every WP call, in this scenario).
I don't favor selectively pulling Vanilla's cookie reading bits out into another app, lest your code get out of sync. It would make upgrading really hard one day.
5
Answers
maybe this will help
http://vanillaforums.org/docs/singlesignon
or this
http://blog.vanillaforums.com/help/implementing-jsconnect-single-signon-on/
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thanks @peregrine but that doc is intended for the opposite direction - vanilla using my application's user base; I'd like my application to use vanilla's user base.
@Wilson29thID I've bootstrapped Vanilla's framework into WordPress with this: https://github.com/lincolnwebs/Glue/tree/master/wp-content/plugins/glue That allows reading their Vanilla identity securely.
Might be helpful to reference. I'll caution it increases overhead quite a bit to double-load applications like that (loading all of Vanilla for every WP call, in this scenario).
I don't favor selectively pulling Vanilla's cookie reading bits out into another app, lest your code get out of sync. It would make upgrading really hard one day.
Thanks Lincoln, that sounds like a great example. I'll have a look.