Skip to content

Using OAuth, Auth user is logged in site user rather than API user #61

@harhoo

Description

@harhoo

Not sure whether this is an issue, intended behaviour, an issue with Postman or my error.

I'm logged into my site as user 1 in Chrome.

Using Postman if I fetch /users/me with the Authorization for user 2 and then call $this->auth->users in the controller, it returns user 1. If I call ResourceServer::getOwnerId() (I'm using the League OAuth provider) it returns user 2. If I logout of the website, $this->auth->users then returns user 2. So it looks (looks) as if the logged in session is overriding Shield and $this->auth.

I'm not sure in practice whether this is an issue but thought I'd mention it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions