There are :
- WordPress
example.domain
- Node.js Express with Passport.js
example.domain/node
Node.js puts connect.sid
to cookies
I can verify a user auth through res.isAuthenticated
when user call any method from Node.js
But how to verify a user auth through WordPress?
WordPress renders pages as MVC client
Node.js works as REST API
I've a few ideas:
May be create a empty method at Node.js that returns flag and add call of it API method at elements when they are loaded?
May be move WP under Node.js return method?
User: I want to example.domain
Node: Yes, you're authorized and can get WP pages with true-auth flag
User: I want to logout from example.domain
Node: Yes, you're not authorized and can get WP pages with false-auth flag```