# Auth0 with Django taking very long to complete login

**URL:** <https://community.auth0.com/t/auth0-with-django-taking-very-long-to-complete-login/80010>\
**Category:** Get Help\
**Tags:** python, django, auth0\
**Created:** [March 16, 2022, 2:19pm UTC](https://community.auth0.com/t/auth0-with-django-taking-very-long-to-complete-login/80010 "2022-03-16T14:19:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tayupov](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/tayupov/32/35929_2.png) [@tayupov](https://community.auth0.com/u/tayupov)\
**Post date:** [March 16, 2022, 2:19pm UTC](https://community.auth0.com/t/auth0-with-django-taking-very-long-to-complete-login/80010/1 "2022-03-16T14:19:17Z")

</div>

Hi everyone,  
I’m currently working on a small Django project that requires a login and I wanted to use Auth0, since I’ve used it in passed project.

I followed a couple of guides, mainly:  
[https://auth0.com/blog/django-authentication/](https://auth0.com/blog/django-authentication/)  
[https://auth0.com/docs/quickstart/webapp/django/01-login](https://auth0.com/docs/quickstart/webapp/django/01-login)

whereas the former seems to be lacking an implementation for the logout, that I could only find on the second guide.

That being said - my real problem is that the time it takes to “complete” the login flow is very long. (i.e. 5 minutes) I can’t really pin point the issue, since I’m not too familiar with the python ecosystem and the dependencies I have used to accomplish this.  
(`python-jose, social-auth-app-django`)

It looks a lot like a timeout to me, but maybe someone has another idea where it gets stuck.

 ![Screenshot 2022-03-16 at 14.52.11](https://global.discourse-cdn.com/auth0/original/3X/4/f/4fa905fa467bd2939b37978d85af0e16e3d26658.png)

Best regards,  
Roman

---

<div class="post-metadata">

**Author:** ![tayupov](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/tayupov/32/35929_2.png) [@tayupov](https://community.auth0.com/u/tayupov)\
**Post date:** [March 16, 2022, 2:24pm UTC](https://community.auth0.com/t/auth0-with-django-taking-very-long-to-complete-login/80010/2 "2022-03-16T14:24:00Z")

</div>

Main Requirements:

```auto
Django==4.0.3
python-jose==3.3.0
social-auth-app-django==5.0.0
social-auth-core==4.2.0

```

Full requirements.txt:

```auto
asgiref==3.5.0
certifi==2021.10.8
cffi==1.15.0
charset-normalizer==2.0.12
cryptography==36.0.2
defusedxml==0.7.1
Django==4.0.3
ecdsa==0.17.0
idna==3.3
oauthlib==3.2.0
psycopg2==2.9.3
pyasn1==0.4.8
pycparser==2.21
PyJWT==2.3.0
python-jose==3.3.0
python3-openid==3.2.0
requests==2.27.1
requests-oauthlib==1.3.1
rsa==4.8
six==1.16.0
social-auth-app-django==5.0.0
social-auth-core==4.2.0
sqlparse==0.4.2
urllib3==1.26.9

```

---

<div class="post-metadata">

**Author:** ![tayupov](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/tayupov/32/35929_2.png) [@tayupov](https://community.auth0.com/u/tayupov)\
**Post date:** [March 17, 2022, 11:18am UTC](https://community.auth0.com/t/auth0-with-django-taking-very-long-to-complete-login/80010/3 "2022-03-17T11:18:18Z")

</div>

Figured it out. Multiple Python installations messed up the callback.

Wiped Python completely from my system, reinstalled and worked like a charm.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [March 17, 2022, 1:03pm UTC](https://community.auth0.com/t/auth0-with-django-taking-very-long-to-complete-login/80010/4 "2022-03-17T13:03:44Z")

</div>

Woooohooo! Glad you have figured it out and really appreciate that you shared it with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [March 31, 2022, 11:13am UTC](https://community.auth0.com/t/auth0-with-django-taking-very-long-to-complete-login/80010/5 "2022-03-31T11:13:33Z")

</div>


