• Resolved careerbuggy

    (@careerbuggy)


    I installed this plugin to test the user registration flow from the mobile app, before this I was using JWT Auth plugin with no issues except registering a user. With your plugin I could register a user by whitelisting the register link but all other end points throwing error saying api_bearer_auth_not_logged_in and “You are not logged in.”. Could you tell me how I have to access other end points with this plugin. For ex: https://www.test.com/wp-json/wp/v2/posts this works with JWT aut but with this plugin I get the above error.

Viewing 1 replies (of 1 total)
  • Plugin Author michielve

    (@michielve)

    Hi,

    When you use this plugin, all endpoints need a bearer token unless you whitelists them. So I can think of 2 reasons you receive this message:

    1) You didn’t send the bearer token in the header like this:

    Authorization: Bearer <your_access_token>

    2) Your server doesn’t allow the bearer token. Apache often strips out the bearer token. If you use Apache then you need to do this:

    RewriteCond %{HTTP:Authorization} ^(.*)
    # Don't know why, but some need the line below instead of the RewriteRule line
    # SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
    RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
Viewing 1 replies (of 1 total)
  • The topic ‘I get your are not logged in error’ is closed to new replies.