Manual login with php
-
Hello, I’m using wordpress as headless cms, therefore I need to authenticate users with ajax requests.
What I have is provider access token and user id (as you say in the docs). Can I log in user with only these informations? Does your plugin expose some php function maybe, that I could use to create custom rest endpoint to authenticate them?
This is how I think it should look like:
-after google (for example) authentication (which I need to code manually on frontend) I receive access token
-im passing this access token to your plugin rest api endpoint to check if user exists
-if user exists im sending request to another endpoint (which I need to create manually), where I’m using your php function to authenticate user with access token and user id.
The problem is, I can’t find any information in your docs on how to log in user with php (having access token and user id). I’m sure you have some function that sets current user with access token… Could you help me with that?
The topic ‘Manual login with php’ is closed to new replies.