How to post frontend login form to a different authentication script from wp-login?

Question

I would like to separate my front-end login from back-end login, but the front-end login will use oAuth-based third-party authentication whereas the back-end will continue to use the WordPress database. Can somebody recommend the best practice to add a separate script for my front-end form to post to, which would still need to use the WordPress framework to log-in authenticated users and create users who successfully authenticate against the third party.

I don’t have a problem with any of the coding of the functionality – I’m not a beginner to PHP – but I’m just not sure how, in WordPress, to define a destination to which a form can be posted but that isn’t a page or post or any other kind of standard WordPress content. Can I define a route in a plugin to catch a POST request from a form in a widget? I dislike the idea of posting to some kind of /wp-content/plugins/frontend-login.php but if that’s the best option, so be it. I’d just like to be sure.

0
Ambulare 4 months 0 Answers 8 views 0

Leave an answer