Created
October 8, 2019 11:15
-
-
Save justingreerbbi/4d68b9823b65ed81ca1e627c0c3c35b4 to your computer and use it in GitHub Desktop.
Auto SSO with WP OAuth Server and Single Sign On Simple Client
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
add_filter( 'template_redirect', 'auto_sso_init', 11 ); | |
function auto_sso_init() { | |
if ( ! is_user_logged_in() ) { | |
wp_safe_redirect( site_url( '?auth=sso' ) ); | |
exit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment