freeCodeCamp / league-for-good

An open source sports league management tool
BSD 3-Clause "New" or "Revised" License
163 stars 106 forks source link

Issue on setting up Google API credentials #54

Closed satyadeeproat closed 7 years ago

satyadeeproat commented 7 years ago

I have set my .env file like this MONGO_URI = 'mongodb://localhost:27017/league-for-good' GOOGLE_CLIENT_ID = '932757790180-0ref2odnm0v9uemj93ib6n3mhr2hescn.apps.googleusercontent.com' GOOGLE_CLIENT_SECRET = 'Gh4wqdrg1bnUfYHa2BsnXx3x' SESSION_SECRET = 'xyz' GOOGLE_CALLBACK_URL = 'http://localhost:4000/auth/google/callback'

still I am getting this error on choosing the account for login after clicking on login button at localhost:4000 screen shot 2017-08-17 at 2 57 07 am

DusanSacha commented 7 years ago

Hi, I also set it up recently, tested it right now and it is working for me.

Have you set up OAuth 2.0 client IDs in Google Dev.console correctly?

Authorized JavaScript origins: http://localhost:4000 Authorized redirect URIs: http://localhost:4000/auth/google/callback

satyadeeproat commented 7 years ago

Am I doing it right?

DusanSacha commented 7 years ago

I think, you are doing it right. It same on my settings.

Make sure your Google+ API is enabled - in your project Dashboard. If not, enable it under the link on top.

league

satyadeeproat commented 7 years ago

YEs that was the issue . Thanks @DusanSacha

ahstein3521 commented 7 years ago

Just an FYI for future reference, but you never want to publish sensitive information like API keys for people to be able to see. That's why it's placed in a .env file. I would have google reassign you a new client_id and client_secret, and use those for your project instance as soon as possible.

On Thu, Aug 17, 2017 at 10:57 AM, Satyadeep Roat notifications@github.com wrote:

Closed #54 https://github.com/freeCodeCamp/league-for-good/issues/54.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/freeCodeCamp/league-for-good/issues/54#event-1210307107, or mute the thread https://github.com/notifications/unsubscribe-auth/AO6vXf2VxCzyGD_IYi7Q9HGAta2eRB4tks5sZFTRgaJpZM4O5gbe .

satyadeeproat commented 7 years ago

yes I have reset that. Thank you for the information