0


As the title tells I'm looking for a solution on how to use my wordpress database in an external php application. I want to use Wordpress because I want only one place for users. One place one password.

I tried including the wordpress blog header but it only works on my blog domain, and not on my domain where I have my php application.

On wordpress.com they have there single sign on thing, I want something like it. I found this and it looks like they use curl and an api looking really simular to WP-REST Api for the sso thing.

Can I use WP-REST api or 0auth with my blog to integrate?

Any help, example, how to's, tips,guidance are very welcome!

  • I've never seen anything that shows how to use WP Authentication from a different domain, but there's a good article here on using it locally (skookum.com/blog/…). You could make the authentication piece work over AJAX if you had to, or if your app is on the same host you could just include the files as shown in the link. If the app is remote, you'll have to do much of the cookie management for auth on your own. – Todd Rowan Sep 2 '15 at 16:17
1

If your main concern is using your Wordpress database for user authentication, I'd look into the WP OAuth Server plugin.

We use this for authentication with a 3rd party mobile app: app users type their username and password into the app which then - thanks to the plugin - authenticates them against their credentials in our Wordpress database.

  • This was really interesting! I vill have a look tomorrow! Thank you! – user2668848 Sep 2 '15 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.