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

瀏覽次數:150 次
跳到第一則未讀訊息

DJANGO DEVELOPER

未讀,
2021年6月1日 上午10:07:212021/6/1
收件者: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

未讀,
2021年6月1日 上午10:16:242021/6/1
收件者: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

未讀,
2021年6月1日 下午1:32:292021/6/1
收件者: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

未讀,
2021年6月1日 下午1:38:352021/6/1
收件者: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

未讀,
2021年6月1日 下午3:50:112021/6/1
收件者: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

未讀,
2021年6月1日 下午4:06:302021/6/1
收件者: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

未讀,
2021年6月1日 晚上9:44:122021/6/1
收件者: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

未讀,
2021年6月1日 晚上9:45:232021/6/1
收件者:django...@googlegroups.com
site url from my app.
siteurl.PNG

DJANGO DEVELOPER

未讀,
2021年6月1日 晚上9:47:312021/6/1
收件者:django...@googlegroups.com
and last settings of my developer app
djproduct.PNG

Omkar Parab

未讀,
2021年6月1日 晚上11:40:132021/6/1
收件者: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

未讀,
2021年6月1日 晚上11:54:412021/6/1
收件者: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

未讀,
2021年6月2日 凌晨12:31:382021/6/2
收件者:django...@googlegroups.com
Run "ngrok.exe http 8000" command in ngrok terminal. 


DJANGO DEVELOPER

未讀,
2021年6月2日 凌晨12:37:452021/6/2
收件者: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

未讀,
2021年6月2日 凌晨12:41:102021/6/2
收件者: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

未讀,
2021年6月2日 凌晨12:42:472021/6/2
收件者:django...@googlegroups.com
do have I to add ngrok url in my facebook app that I created to get client secret?

Omkar Parab

未讀,
2021年6月2日 凌晨1:19:182021/6/2
收件者:django...@googlegroups.com

DJANGO DEVELOPER

未讀,
2021年6月2日 凌晨1:23:502021/6/2
收件者: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

未讀,
2021年6月2日 凌晨1:30:312021/6/2
收件者:django...@googlegroups.com

DJANGO DEVELOPER

未讀,
2021年6月2日 凌晨1:35:322021/6/2
收件者: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

未讀,
2021年6月2日 凌晨1:38:252021/6/2
收件者:django...@googlegroups.com
You need to pass csrf_token using <form> tag or via JS. 

DJANGO DEVELOPER

未讀,
2021年6月2日 凌晨1:43:432021/6/2
收件者:django...@googlegroups.com
actually I am using django-allauth and it doesn't need to have a form to login via facebook.

Omkar Parab

未讀,
2021年6月2日 凌晨1:59:382021/6/2
收件者:django...@googlegroups.com

DJANGO DEVELOPER

未讀,
2021年6月2日 凌晨2:04:472021/6/2
收件者:django...@googlegroups.com
it is based on social-django but I am using django-allauth.

回覆所有人
回覆作者
轉寄
0 則新訊息