Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Available Domains confusing on failure #12

Open
andrwp opened this issue Apr 8, 2014 · 0 comments
Open

Available Domains confusing on failure #12

andrwp opened this issue Apr 8, 2014 · 0 comments

Comments

@andrwp
Copy link

andrwp commented Apr 8, 2014

Background: We use Google apps for our company and are using this plugin to allow users to sign into redmine with their Google account on our domain.

Issue: When a user is logged into their personal gmail account and not their work account (this happens, for example, when users are working from home or using their smart phones), they just get the notice_domain_not_allowed error message and are dropped back into the redmine login page. This creates an endless loop with no obvious indication that the user needs to sign into their Google apps account on our domain.

Workaround: Google's hd parameter restricts the login to the specified hosted domain. Adding

:hd => 'domain.com'

to the oauth_client.auth_code.authorize_url() call in redmine_oauth_controller.rb correctly brings users to a Google login page if they're logged into different Google account so that fixes our use case.

Problem: It would be nice to use the allowed_domains setting for this and have a checkbox to restrict to a hosted domain. The problem is that allowed_domains is an array and hd only allows a single domain so there's not a one-to-one mapping. Adding a separate textfield input for a hosted domain is an option but it seems redundant.

If anyone has any ideas I'd be happy to do some hacking and submit a patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant