Support » Fixing WordPress » Using An External API for Member Login to WP site.

Viewing 1 replies (of 1 total)
  • Subrata Sarkar


    So what you are basically saying is the authenticity will be done using the API but the user authenticated will get permission to access secured areas of WordPress site.

    I am not very sure if this is achievable since from your requirement it looks like such a user is not actually existing in your native WordPress site.

    When you return true / false from the API you might get some additional information like username, email address etc. back from the API and create some cookies for it. But the problem is you will not be able to use WordPress native functions like is_user_logged_in, current_user_can, is_in_role, get_user_meta etc.

    I may be wrong, but in order to be able to use WordPress native user based functionalities, to my knowledge, users need to be a part of your WordPress application database.

    Also if you use AJAX to deal with your API, you might well be encountering Cross Origin Resource Sharing (CORS) issues. You API has to be compatible to deal with it and make information available over Cross Origins.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.