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

Google Provider OAuth settings for development #2892

Closed
2 tasks
SidharthBansal opened this issue Jun 21, 2018 · 23 comments
Closed
2 tasks

Google Provider OAuth settings for development #2892

SidharthBansal opened this issue Jun 21, 2018 · 23 comments

Comments

@SidharthBansal
Copy link
Member

SidharthBansal commented Jun 21, 2018

We have completed Google OAuth provider settings on

  • unstable.publiclab.org
  • stable.publiclab.org
  • publiclab.org
    The following are left so that the developers can use it in development
  • localhost:3000(http connection)
  • localhost:3001(https connection)
    We are moving from the conversation of Google Authentication  #2771 to here.
    @jywarren Can you please make the changes to the Google developers app as you indicated in Documentation added for OAuth #2855 (comment)?
@jywarren
Copy link
Member

Just did it, i believe!

@jywarren
Copy link
Member

Can u check and close this if it works? Thanks @SidharthBansal !!!

@SidharthBansal
Copy link
Member Author

Sorry, it is not working
Missing Required Parameter: client_id

@SidharthBansal
Copy link
Member Author

Is it working in your browser @jywarren for both ports 3000 and 3001

@jywarren
Copy link
Member

jywarren commented Jun 21, 2018 via email

@SidharthBansal
Copy link
Member Author

I don't require any privacy policy nor domain verification for the 3000 and 3001 port.
I just need the People connect api which is for sure enabled in the app created by you.

@SidharthBansal
Copy link
Member Author

Can you please verify them
image

@jywarren
Copy link
Member

screen shot 2018-06-21 at 7 17 28 pm

@SidharthBansal
Copy link
Member Author

Is it working on your localhost?
Can we change this app_id and app_secret to my app_id and app_secret to check it in development first?

@jywarren
Copy link
Member

jywarren commented Jun 21, 2018 via email

@SidharthBansal
Copy link
Member Author

Yeah I saw that there is testing key for ReCaptcha working with localhost

@SidharthBansal
Copy link
Member Author

are there "trial" ids available for working in development?

No there are not.
I was thinking that first we can change the app_id and app_secret in the jenkins to my app_id and app_secret and see whether we are able to configure google login on localhost or not on both my laptop and yours.

If we will not be able to configure it ,that will mean that we can't have same id for all developers

if we both will be able to log in via google provider that means, we need to change the app_id and app_secret in the jenkins back to the app_id and app_secret which you have created for production and need to modify the app settings OR may be we need to create one more app for developers access. Possible reason for this could be localhost is not having domain verification and we have done domain verifaction for that app. Make sense?

@SidharthBansal
Copy link
Member Author

I have sent you app_id and app_Secret on jeff@publiclab.org.

@jywarren
Copy link
Member

jywarren commented Jun 21, 2018 via email

@SidharthBansal
Copy link
Member Author

Maybe my brain needs a break!

Ok. You take rest. We can continue it later.

Be sure not to forget to sleep!

Yeah sure. Thanks

@SidharthBansal
Copy link
Member Author

A few things
in production we have ReCaptcha
image

But in the development, we don't have it
image

Also, see

if Rails.env.production?

This line says if the environment is production which localhost:3000 is not. So this file doesn't have any role in development.

As you mentioned this in #2855 (comment). So, I inspected it by deleting the ENV[''...''].... line. Even then I could not see any change on localhost:3000/signup. This shows that ReCaptcha is not surely available in the development.

I don't think we have any other page using ReCaptcha.

@SidharthBansal
Copy link
Member Author

SidharthBansal commented Jun 22, 2018

@jywarren Also the form which is rendered inside the signup form says that ReCaptcha is not used in development

<% if Rails.env == "production" && !params[:spamaway] %>
<%= recaptcha_tags %>
<% else %>
<%= fields_for @spamaway do |spam| %>
<div class="form-group spamaway">
<label for="spamaway_follow_instructions">
<%= t('users._form.are_you_human') %>
</label>
<p>
<%= t('users._form.spam_filtering') %>
</p>
<% vars = [:statement1, :statement2, :statement3, :statement4] %>
<% turingtest = Spamaway.get_pairs vars.length %>
<% turingtest.each_index do |i| %>
<div class="btn-group btn-group-justified" role="group">
<% [0,1].each_with_index do |s, j| %><% statement = turingtest[i][s] %>
<div class="btn-group" role="group">
<button type="button" class="col-xs-5 btn btn-default" style="text-align:left;<% if i.odd? %> background:#eef;<% end %>" id="spamaway-<%= i.to_s + j.to_s %>">
<%= spam.radio_button vars[i], statement %> <%= statement %>
</button>
</div>
<% end %>

@SidharthBansal SidharthBansal self-assigned this Jun 22, 2018
@SidharthBansal
Copy link
Member Author

SidharthBansal commented Jun 24, 2018

@jywarren once we are done with this, you need to do settings for GitHub as a provider in #2856.
Github is working fine on my laptop on localhost.
The settings of Github are merged by you.

@jywarren
Copy link
Member

Well, I guess I'm not sure what we can do here. The settings are created but localhost is not working - possibly due to domain verification which we cannot do for localhost. See the settings in this comment: #2892 (comment) -- what else is left that we could try?

As to the environment variables, you can insert them at run time locally by doing:

OAUTH_GOOGLE_APP_KEY=xxxxxxxx passenger start

Or, you can put it in a file like environment.sh which is like:

OAUTH_GOOGLE_APP_KEY=xxxxxxxx

and do:

source environment.sh && passenger start

@SidharthBansal
Copy link
Member Author

SidharthBansal commented Jun 26, 2018

The settings are created but localhost is not working - possibly due to domain verification which we cannot do for localhost

If not can you please check it with the app_id and app_secret which I have sent you on jeff@publiclab.org
My app_id and app_secret is working on localhost which I have sent you.

I think this can help to troubleshoot a little bit

@SidharthBansal
Copy link
Member Author

The settings are created but localhost is not working - possibly due to domain verification which we cannot do for localhost

Localhost does not require any domain verification but the websites does. So, in the app_id and app_secret which I have sent you. I have not done any domain verification.

@jywarren
Copy link
Member

jywarren commented Jun 26, 2018 via email

@SidharthBansal
Copy link
Member Author

As discussed in #2856, we will either create one developers app for github provider OR we will write documentation for developer to set up their app locally.

So, @jywarren we are completed with GOOGLE, so no need to try this.
Thanks @jywarren

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

No branches or pull requests

2 participants