getredash/redash

Add `hd` parameter for optimized Google Apps login

Open

#1.924 geöffnet am 9. Aug. 2017

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (4.236 Forks)batch import
Backendenhancementhelp wanted

Repository-Metriken

Stars
 (24.845 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 9T 5h) (3 gemergte PRs in 30 T)

Beschreibung

https://github.com/getredash/redash/blob/53268989c5fe5c619b399b488094c501cb286af4/redash/authentication/google_oauth.py#L91

Would it be possible to add the hd parameter to this authorization URL in the event that there's a single allowed Google Apps domain? It optimizes the sign in experience by limiting the suggested accounts to those for the passed Google domain.

If you're signed in to a single account on the domain and already authorized Redash: instant redirect to login.

If you're signed in on the domain and haven't authorized Redash: present only accounts from the authorized Google domain.

If you're not signed in: present the login dialog with your domain pre-filled.

If you're interested in merging something like this but can't prioritize this as a feature I can put together a PR with the changes required.

Contributor Guide