I use the sso plugin with wordpress and find it cannot log out at the same time. So I found that way. It might a little bit dangerous because it just delete cookie. Is there any other way to log out at same time?
This is my way to logoutLogout wordpress -> Delete Cookie of NodeBB -> return to nodebb homepage
Step 1: create this php file under wordpress dir<?php require( dirname(__FILE__) . '/wp-load.php' ); wp_logout(); setcookie("express.sid", FALSE, time()-YEAR_IN_SECONDS, '', "~~FORUM_COOKIE_DOMAIN~~"); header("Location: http://~~FORUM_COOKIE_DOMAIN~~/"); exit;
Step 2 : make NodeBB can access this file when logout
When we logout form NodeBB, it send us to /logout and a string.
So I use the nginx as proxy server to access php files. here is my config file of nginx