Skip to content

Is this correct way to specify scopes for password grant? #10

Open
@linuxd3v

Description

@linuxd3v

Im doing password grant and a little stumped on how to specify scopes.
Looking at OpenIDConnectProvider code looks like scopes are specified in provider options.
I've tried that but this resulted in id_token not being returned.

After digging more I found that this worked for me - specifying when I call to get access token:

            $token = $oidcClient->getAccessToken('password', [
                'username' => $ue,
                'password' => $p,
                'scope'    => 'openid email username is_first_login',
            ]);

Which one is correct though? and why would I specify scopes in provider options then?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions