I would like my PHP based page (directory.domain.com) to use my NodeJS server to authenticate (api.domain.com). I have implemented passportjs on the NodeJS server for authentication.
I would like to authenticate the user through the NodeJS server when submitting a login form on directory.domain.com and create a session whereby the user can make post, get, put calls to the api.
Is this something that is possible? Is it as simple as creating a ajax request to the api and then setting a token?