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

Fix google_oauth2 hd check: fix hd option fetching #84

Merged
merged 2 commits into from
Aug 24, 2017

Conversation

winebarrel
Copy link

Error occurs when setting as follows:

    google_oauth2:
      client_id: '<%= ENV["GOOGLE_CLIENT_ID"] %>'
      client_secret: '<%= ENV["GOOGLE_CLIENT_SECRET"] %>'
      options:
        #hd: '<%= ENV["GOOGLE_HOSTED_DOMAIN"] %>'
NoMethodError (undefined method `hd' for nil:NilClass):
kuroko2 (0.4.2) app/controllers/kuroko2/sessions_controller.rb:38:in `valid_google_hosted_domain?'

Please merge if no problem 🙏

@eisuke
Copy link
Member

eisuke commented Aug 24, 2017

I think that there is no case without G suite hosted domain. How about making it required? (
Kuroko2 raises error with messages when there is no hd option)

@winebarrel
Copy link
Author

winebarrel commented Aug 24, 2017

How about making it required?

hd option is unnecessary when using normal gmail (non-G suite).
I think some users do not use G suite.

@eisuke
Copy link
Member

eisuke commented Aug 24, 2017

I think some users do not use G suite.

Ah, Make sense...

Copy link
Member

@eisuke eisuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix failure specs.

Copy link
Member

@eisuke eisuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@eisuke eisuke merged commit 6b17f1c into cookpad:master Aug 24, 2017
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

Successfully merging this pull request may close these issues.

2 participants