Skip to content

Google: extended hd whitelisting support #16

@drzraf

Description

@drzraf

hd parameters allow to limit allowed users to those belonging to one specific GSuite domain (other values like * or unset allow every user).
This is done by vendor/league/oauth2-google/src/Provider/Google.php::assertMatchingDomain()
which is the last instruction done before Provider::getResourceOwner() returns.

This is not as flexible as possible as it may be desirable to provide whitelisted domains either as a list or a regexp, ...
A flexible and future-proof solution would be to simply allow user-provided function to define this behavior (taking OIDC user-data as parameters and returning a boolean about whether user is accepted).

Do you think there could be room, either inBaseProvider.php or GoogleProvider.php for such an improvement?

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