Hi Nguyễn,
I've asked
a similar question on this newsgroup earlier, and done just a bit of research into the area. Here are a few notes...I hope they help!
I got partway through an experiment with setting up SSO between WP and Open edX. I set up a simple WordPress site to act as the Relying Partner (RP) and had Open edX serving as the OpenID Provider (OP), similar to how I
nsights manages SSO with Open edX. My intention was 1) to make users have to register on the Open edX site and 2) whenever somebody logs in, point them at the Open edX login page then return them to the WP page, fully logged in and able to access role-protected content.
For WordPress, I used the plugin
daggerhart / openid-connect-generic plugin to try to facilitate setting up the OpenID connection. The problem I ran into is that this plugin uses a GET variable
action=openid-connect-authorize to help route the callback to within the admin-ajax.php page during OAuth2 authentication...however, Open edX will strip this extra GET variable when redirecting the browser, thereby breaking the process. ( Meanwhile, I've
asked the openid-connect-generic library developer is there is a way in WordPress to route the callback to a full URL rather than using a GET variable.)
So it looks promising, but haven't completed the experiment yet. Perhaps you'll get farther. Curious what your approach is if you intend to have WordPress act as the OP.
Hope that helps.
Daniel