Comments (20)
@aaguiarz I'm back on this problem (probably about to burn a branch), have you guys gotten that Django2.0 version out yet?
from auth0-django-web-app.
is the error that you get like the following?
'Specifying a namespace in include() without providing an app_name '
django.core.exceptions.ImproperlyConfigured: Specifying a namespace in include() without providing an app_name is not supported. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.
from auth0-django-web-app.
The sample is written for Django 1.x, we'll be porting it to Django 2 in the next few weeks.
from auth0-django-web-app.
Thanks for your reply.
I'm going to give it another honest try once I familiarize myself more with Django and Auth0.
It's great to hear that you guys are planning to keep up with the latest frameworks though. I also need to debug an issue I am encountering with the dotnetcore 2.0 sample so if I make any traction on either of these projects I will certainly make a pull request with my contributions.
Worst case scenario I learn something. 😄
from auth0-django-web-app.
I got it working (not nicely) in Django2.0, if anyone has questions and even suggestions until the tutorial is updated, feel free to hit me up or tag me with your suggestions.
from auth0-django-web-app.
If someone has a PR to submit, we'll happily review it ;)
from auth0-django-web-app.
Alright I got it working fine in Django2.0.4. The only thing I changed was my URLConf to actually use Django2 syntaxing, and make sure your callback url is set to http://localhost:3000/complete/auth0
Note: I didn't actually use this example, I used the quick start django guide on the site.
from auth0-django-web-app.
I am having the exact same problem and would appreciate help! I tried changing
url(r'^', include('django.contrib.auth.urls', namespace='auth')),
url(r'^', include('social_django.urls', namespace='social')),
to:
path('auth/', include('django.contrib.auth.urls')),
path('social/', include('social_django.urls')),
That doesn't give me an error, but it also doesn't work :/ Any idea what I'm missing? @JohnVonNeumann
from auth0-django-web-app.
@bld2104 In Django 1.x, the namespace
argument was kept in URLs, but this didn't make much sense as it is used in the app itself. So in Django 2.0, this was replaced by moving the app_name
in its place into the app itself, in the urls.py
file. I checked social_django
and version 2.1 seems to be Django 2.0 compatible (it has an app_name
in its urls.py
); you can see it here: https://github.com/python-social-auth/social-app-django/blob/master/social_django/urls.py#L11
I noticed your routes in Django 1.x are at the root of the site, and in the 2.x version, they are not. Have you tried this under Django 2.x?
from django.urls import re_path
...
urlpatterns = [
re_path(r'^', include('django.contrib.auth.urls')),
re_path(r'^', include('social_django.urls')),
]
from auth0-django-web-app.
Thank you @FlipperPA ! That solved the error, but now when I try to go to the login page, I get this error:
"ModuleNotFoundError at /login/auth0
No module named '[MY_PROJECT_NAME].auth0backend'"
If I add app_name = '[MY_APP_NAME]' to my_app/urls.py, I then get this error:
"NoReverseMatch at /login/auth0
'social' is not a registered namespace"
Guidance here is much appreciated if possible @brianjenkins94 @slivingston @aaguiarz @JohnVonNeumann
from auth0-django-web-app.
Making progress on this - turns out I had auth0backend.py in the wrong place. Once I moved it I am now getting the following error on line 15 of auth0backend.py:
"must be str, not NoneType"
from auth0-django-web-app.
If I change self.setting('DOMAIN') in that line to my Auth0 domain it seems to work, but is this really a good idea? Is there a way to define the DOMAIN somewhere or a reason this is breaking? If it doesn't matter, I can just go in and manually chance all of the self.setting('DOMAIN') instances to my Auth0 domain. Still would appreciate guidance!
from auth0-django-web-app.
Update: Jose in support let me know that I can manually type in my domain. That worked, but now I'm facing the error: no such table: social_auth_usersocialauth. I keep trying to run python manage.py migrate, and have followed these instructions but nothing is working.
https://github.com/omab/python-social-auth/blob/master/MIGRATING_TO_SOCIAL.md#django
https://stackoverflow.com/questions/42545981/no-such-table-social-auth-usersocialauth
from auth0-django-web-app.
As Django 2.0 is using Python 3, make sure you update the library python-jose file jsoe.py
to Py3 format, i.e. print()
.
from auth0-django-web-app.
Thank you for responding @windhamwong ! I checked every file in the jose package and can't find a print statement anywhere. I think you are correct that it has to do with Django 2.0 though, because Auth0 support said that they couldn't replicate the problem on django 1.11 with social-app-auth-django 2.1.0. My requirements.txt file is attached (some of those I'm not using and need to delete, I realize the file is long!)
from auth0-django-web-app.
@JohnVonNeumann could you describe what problem you are having?
from auth0-django-web-app.
Re: Django2, not yet, we don't have a date for it yet.
from auth0-django-web-app.
Are their any updates for this?
from auth0-django-web-app.
Hello @riodw - See #19
Quickstart and sample will be updated in the coming days.
from auth0-django-web-app.
@JohnVonNeumann, I know you commented a while ago. But I followed the quickstart guide completely for Django. I am able to authenticate 2 different apps but not using the same universal login - I have raised an issue here:
#27
Let me know if you have any suggestions!
from auth0-django-web-app.
Related Issues (15)
- Exception during the second login using different accounts HOT 3
- Django 2 support HOT 3
- login/auth0 not found HOT 2
- django-allauth and auth0 HOT 10
- Logging in with less clicks HOT 1
- a bytes-like object is required, not 'str' HOT 1
- Redirect to multiple apps HOT 1
- Passing extraParam to Auth0's universal login HOT 1
- Error trying to return details['user_id'] on get_user_id HOT 1
- Django sample builds from scratch, but there is an existing Auth0 backend. HOT 10
- Feature request: integrate auth0 login with app-generator/django-user-profile HOT 2
- Importing twice redirect function HOT 2
- The specified alg value is not allowed HOT 5
- Error during requirements install in Django
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auth0-django-web-app.