Is it possible to authentificate a logged in WP user by it's wp auth cookie from an external app (simple JS webapp on a different domain)?
The setup is:
- My webapp is on domain/generator/
- The wordpress installation is on users.domain
- Same server, I have access to the WP DB
The problem: The nonce which is needed to validate the wp auth cookie is only available inside wp. But I have to check that from outside WP.
At the moment a user always has to log in on my external app. Authentification is done using the JWT Auth Plugin. That works perfect. I only don't like the fact, that the user has to login again although it is already logged in via WP.
Any ideas how to make it work by using the standard wp login?
What I want to know:
- Is a user logged in?
- If yes, whats the ID of that logged in user?