question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Social login with google

See original GitHub issue

Hi, I want to provide social login via facebook/google for my app, While I got FB to work I cannot figure out what the code should be when using google as auth provider. Could please anybody elaborate on that?

Also I think we should document that for facebook code is the same of App Token, it took me some time to figure it out

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:18
  • Comments:11

github_iconTop GitHub Comments

8reactions
MattBlack85commented, Nov 28, 2016

@gbrennon I was able to use also google login in the end, I’m putting together a small tutorial but for now:

  • Add to your google login view client_class = OAuth2Client
  • Add to the same view a callback url (it can be a fake one)
  • now you are able to log your users in only with code

If you want to test this you can use https://developers.google.com/oauthplayground/

  • choose Google OAuth API v2
  • choose some of the options
  • click authorize API
  • you are redirected to google profiles choose
  • allow

Now on the left side of the page you can see an authorization code, that’s the code required by rest-auth, have fun!

The playgorund simulates well a mobile app asking for permissions, then you can create a real app in the developer’s console, put the required code into the mobile/web app and send the Authorization code from google to your API.

Hope this helps!

2reactions
umarmughal824commented, Jan 20, 2018

Hey guys, I have fixed it by customization. I have posted in on StackOverflow as well.

Here is the link of my stackoverflow answer.

see the answer of this issue

As the default code only deals with access_token but google provide id_token. So If you want to use id_token as well. then you can follow the link given in that post begining. I have got it working for both id_token and access_token.

I will solve this issue for sure.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Integrating Google Sign-In into your web app | Authentication
Integrating Google Sign-In into your web app · Create authorization credentials · Load the Google Platform Library · Specify your app's client ID ......
Read more >
Google Social Login with Magic
Navigate to Social Login from the sidebar; Click the toggle for Google / Gmail; Input the Client ID and Client Secret for your...
Read more >
How to create a Google app for Social Login Into WordPress
go to miniOrange Social Login Plugin → Click on Configure Apps → click on Google: · Copy the Client Id and Client Secret...
Read more >
Google social login integration - Okta Developer
In the Admin Console, go to Security > Identity Providers. Click Add Identity Provider, and then select. Google. IdP.
Read more >
Google Social Login - OpenIAM Documentation
Now on login page you can see red button 'Sign with Google', if you click on it Google will ask you to share...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found