I’m trying to implement single sign on between WordPress and ASP.NET site on Azure.
In this case WordPress will be the Identity Provider and ASP.NET site on Azure will be Service Provider. These 2 sites don’t have the same domain so they cannot exchange cookies for single sign on.
What should be the best approach for this to be possible?
I think you need to use JWT (JSON web tokens) rather than cookies. With JWT, this tool would be useful for what you’re up to do:
https://github.com/Aralink/ssojwt
For doing JWT in wordpress have a look into:
https://wordpress.org/plugins/wp-jwt-auth/
and in ASP.net stack this could be useful :
http://www.developerhandbook.com/c-sharp/create-restful-api-authentication-using-web-api-jwt/