The idea is:
Google Workspace SAML does not have a way to filter the accounts list so all your logged in Google accounts show in the account switcher. Google OIDC does however have this option through the hd query parameter. It would be great if there was an extra config option for OIDC which was either just hd
or some JSON of any query parameters you wanted to add to the login URL which would be added to generateLoginUrl()
. This would let you add e.g. {"hd": "example.com"}
to make the Google account switcher much simpler.
My use case:
Some people have many personal Google accounts which makes logging in with SAML or OIDC without any filters quite exhausting. This would make it so only one account would show up.
I think it would be beneficial to add this because:
Google Workspace is popular and there isn’t a current workaround other than completely changing your IdP.
Any resources to support this?
Linked the relevant code and the docs for Google’s hd
above.
Are you willing to work on this?
Yes although I’m not familar with how testing works in the codebase.