best tutorial or guidance for social login(facebook or google) using django allauth and rest auth

147 views
Skip to first unread message

DJANGO DEVELOPER

unread,
Jun 1, 2021, 10:07:21 AM6/1/21
to Django users
I need to develop a social login functionality for facebook using django allauth and django rest auth. I am struggling from 3 days and I would like to someone who can refer me a good tutorial or any other written guidance.
till now I have only implemented some basic code and following this tutorial :    https://medium.com/geekculture/setup-social-authentication-in-django-rest-framework-1afdb675375f

Need urgent help

Omkar Parab

unread,
Jun 1, 2021, 10:16:24 AM6/1/21
to django...@googlegroups.com
What error you're getting? 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/698f6b6d-8e4a-4f2e-bb35-85ff55b0795an%40googlegroups.com.

DJANGO DEVELOPER

unread,
Jun 1, 2021, 1:32:29 PM6/1/21
to django...@googlegroups.com
I am getting "page not found" error. this error is pretty known to me but I tried all combinations of urls but still getting page not found error.

Kasper Laudrup

unread,
Jun 1, 2021, 1:38:35 PM6/1/21
to django...@googlegroups.com
On 01/06/2021 19.30, DJANGO DEVELOPER wrote:
> I am getting "page not found" error. this error is pretty known to me
> but I tried all combinations of urls but still getting page not found error.
>

You most definitely haven't tried all combinations of URLs since even if
you would have automated it, you most likely wouldn't succeed during the
lifetime of this universe.

Maybe you could describe a bit what you have actually tried and post the
relevant code where you are facing issues?

Then I'm sure someone will be happy to help you.

Kind regards,

Kasper Laudrup

OpenPGP_signature

DJANGO DEVELOPER

unread,
Jun 1, 2021, 3:50:11 PM6/1/21
to django...@googlegroups.com
I am using django-allauth library and i am following this tutorial. https://medium.com/geekculture/setup-social-authentication-in-django-rest-framework-1afdb675375f

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
err.PNG

Kasper Laudrup

unread,
Jun 1, 2021, 4:06:30 PM6/1/21
to django...@googlegroups.com
On 01/06/2021 21.49, DJANGO DEVELOPER wrote:
> I am using django-allauth library and i am following this
> tutorial. https://medium.com/geekculture/setup-social-authentication-in-django-rest-framework-1afdb675375f
> <https://medium.com/geekculture/setup-social-authentication-in-django-rest-framework-1afdb675375f>
>

You've said so already, but at least now you've posted an error message.

What's the URL you're trying to load and what's currently in the "App
Domains" field in your app settings?

Kind regards,

Kasper Laudrup

OpenPGP_signature

DJANGO DEVELOPER

unread,
Jun 1, 2021, 9:44:12 PM6/1/21
to django...@googlegroups.com
I have 2 sites in my django admin side. one is localhost:8000 and other is 127.0.0.1:8000

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
domain.PNG

DJANGO DEVELOPER

unread,
Jun 1, 2021, 9:45:23 PM6/1/21
to django...@googlegroups.com
site url from my app.
siteurl.PNG

DJANGO DEVELOPER

unread,
Jun 1, 2021, 9:47:31 PM6/1/21
to django...@googlegroups.com
and last settings of my developer app
djproduct.PNG

Omkar Parab

unread,
Jun 1, 2021, 11:40:13 PM6/1/21
to django...@googlegroups.com
Facebook login won't work with these local URLs. Only google login will work. Don't waste your time. Either host it on Heroku or install ngrok and try again. 

DJANGO DEVELOPER

unread,
Jun 1, 2021, 11:54:41 PM6/1/21
to django...@googlegroups.com
let suppose I have installed ngrok, then should have I to run command of ngrok.exe in project's directory or anywhere?

Omkar Parab

unread,
Jun 2, 2021, 12:31:38 AM6/2/21
to django...@googlegroups.com
Run "ngrok.exe http 8000" command in ngrok terminal. 


DJANGO DEVELOPER

unread,
Jun 2, 2021, 12:37:45 AM6/2/21
to django...@googlegroups.com
The connection to https://d0f7dea89f18.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:8000.
facing this error

DJANGO DEVELOPER

unread,
Jun 2, 2021, 12:41:10 AM6/2/21
to django...@googlegroups.com
oh, I had to run the local server first. it is running successfully but giving the same error of urls.
err.PNG

DJANGO DEVELOPER

unread,
Jun 2, 2021, 12:42:47 AM6/2/21
to django...@googlegroups.com
do have I to add ngrok url in my facebook app that I created to get client secret?

Omkar Parab

unread,
Jun 2, 2021, 1:19:18 AM6/2/21
to django...@googlegroups.com

DJANGO DEVELOPER

unread,
Jun 2, 2021, 1:23:50 AM6/2/21
to django...@googlegroups.com
it is working now but giving the errors attached in the photo.  when I click on send anyway, then it shows error of csrf forbidden. I am getting confused again and again.

notsecure.PNG
csrf.PNG

Omkar Parab

unread,
Jun 2, 2021, 1:30:31 AM6/2/21
to django...@googlegroups.com

DJANGO DEVELOPER

unread,
Jun 2, 2021, 1:35:32 AM6/2/21
to django...@googlegroups.com
yes, I used https. as you can see in the first photo, it is showing that, it is a secure connection

Omkar Parab

unread,
Jun 2, 2021, 1:38:25 AM6/2/21
to django...@googlegroups.com
You need to pass csrf_token using <form> tag or via JS. 

DJANGO DEVELOPER

unread,
Jun 2, 2021, 1:43:43 AM6/2/21
to django...@googlegroups.com
actually I am using django-allauth and it doesn't need to have a form to login via facebook.

Omkar Parab

unread,
Jun 2, 2021, 1:59:38 AM6/2/21
to django...@googlegroups.com

DJANGO DEVELOPER

unread,
Jun 2, 2021, 2:04:47 AM6/2/21
to django...@googlegroups.com
it is based on social-django but I am using django-allauth.

Reply all
Reply to author
Forward
0 new messages