Created
November 14, 2019 23:07
-
-
Save justingreerbbi/d1d7e6af47796a9ff2a647fcc3cc1108 to your computer and use it in GitHub Desktop.
User Redirect after login to WordPress REST API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This can be used in conjuction https://gist.github.com/justingreerbbi/768f1effcca69b4098c9d0f7731deba0 | |
* This code would go on the WP side. | |
*/ | |
add_action('clear_auth_cookie', 'wp_oaut_server_logout_user_rediect_to_client_rest_api_endpoint'); | |
function wp_oaut_server_logout_user_rediect_to_client_rest_api_endpoint(){ | |
wp_redirect('https://site.com/wp-json/wpoauthserver/v1/logout/'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check out https://gist.github.com/justingreerbbi/768f1effcca69b4098c9d0f7731deba0 for the other part.