Restricted Domain

Created on 20 November 2024, 5 months ago

Is it possible to configure the module to accept multiple restricted domains? I tried copying the code, but when I try to call the module from another URL, it can't find the URL. Is it possible to make this work? I would like to restrict login to multiple domains in some way.

πŸ’¬ Support request
Status

Needs work

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @intradavid
  • πŸ‡¬πŸ‡§United Kingdom scott_euser

    I don't think you can restrict multiple domains; at least according to the docs not BUT it does look like you can restrict to accounts owned by a Google Cloud Organization according to the docs: https://developers.google.com/identity/openid-connect/openid-connect#hd-...

    I have not tested it but setting it to * should cover that.

  • The problem is that I can't use a wildcard because there are domains that I am not allowed to enable, so I need to allow login for specific domains only. It would also be a good solution for me if I use multiple APIs or if there are multiple buttons that users can use to authenticate. But if this cannot be resolved this way, then I need to look for another solution.

  • πŸ‡¬πŸ‡§United Kingdom scott_euser

    From Google's docs it doesn't look like that's an option, that link describes a single domain or wildcard only.

    But maybe there is a way to add a validation step prior to Drupal allowing the authentication to create the user account, ie just at the stage where Google has returned the authorised email to bail out there. Haven't explored that myself though.

  • I would be happy to help with the testing if it’s not too complicated to integrate this feature into the module.

Production build 0.71.5 2024