Skip to content

Auth0 user returns 'sub' parameter instead of user_id #24

Open
@elliot-sawyer

Description

@elliot-sawyer

When I log in with Auth0, the response contains a sub parameter instead of the expected user_id parameter shown in Auth0ResourceOwner. Am I using Auth0 incorrectly, or has something changed recently (due to the purchase by Okta?)

    public function getId()
    {
        return $this->getValueByKey($this->response, 'user_id');
    }

I could probably work around that by tweaking this method to check for user_id, then sub if user_id isn't found. If that's an acceptable solution I can raise a PR.

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