Set logged in user based on API response
init is probably a good hook to do the API call, if you need know somehting about the current WP user as the user is authenticated by that time. You can check the WP user login status with is_user_logged_in(), if needed. Or if you need to do some redirecting, then template_redirect could also be a … Read more