Questions tagged [django-oauth]

Django OAuth Toolkit can help you providing out of the box all the endpoints, data and logic needed to add OAuth2 capabilities to your Django projects

Django OAuth Toolkit can help you providing out of the box all the endpoints, data and logic needed to add OAuth2 capabilities to your Django projects. Django OAuth Toolkit makes extensive use of the excellent OAuthLib, so that everything is rfc-compliant.

Requirements:

  • Python 2.7, 3.4, 3.5, 3.6

  • Django 1.8, 1.9, 1.10, 1.11

Site: https://django-oauth-toolkit.readthedocs.io/en/latest/

Support: https://groups.google.com/forum/#!forum/django-oauth-toolkit

93 questions
19
votes
2 answers

Could not import 'oauth2_provider.ext.rest_framework.OAuth2Authentication' for API setting 'DEFAULT_AUTHENTICATION_CLASSES'

It's the first time I work with django rest and Django Oauth toolkit I'm following this tutorial oauth2-with-django-rest-framework But when I run python manage.py migrate I get the following error: ImportError: Could not import…
16
votes
4 answers

Generating single access token with Django OAuth2 Toolkit

I'm using the latest Django OAuth2 Toolkit (0.10.0) with Python 2.7, Django 1.8 and Django REST framework 3.3 While using the grant_type=password, I noticed some weird behavior that any time the user asks for a new access token: curl -X POST -d…
Gal Silberman
  • 3,756
  • 4
  • 31
  • 58
11
votes
4 answers

Django OAuth Toolkit - Register a user

I've gone through the docs of Provider and Resource of Django OAuth Toolkit, but all I'm able to find is how to 'authenticate' a user, not how to register a user. I'm able to set up everything on my machine, but not sure how to register a user using…
10
votes
1 answer

Django OAuth- Separate Resource and Authorization Server

I'm using Django Oauth Library. I want to have different Auth and Resource Server. On Auth Server, following is my setting. INSTALLED_APPS = [ ... 'oauth2_provider', 'rest_framework', ] REST_FRAMEWORK = { …
Praful Bagai
  • 16,684
  • 50
  • 136
  • 267
7
votes
2 answers

Django-OAuth-ToolKit : Generating access token's for multiple resources/services using client credentials grant type of OAuth2.0

I have a couple of backend API's which are Django projects. They have a UI ( single page app) to it and a user name password based login. My clients are usually developers and they don't want the UI , all they want is the access to the backend API's…
7
votes
3 answers

Securing Django OAuth Toolkit Views

We're looking to implement Django OAuth on our backend in order to integrate Alexa and other 3rd party APIs. We've been following the tutorials on their site (http://django-oauth-toolkit.readthedocs.io/en/latest/tutorial/tutorial.html), but have run…
Nat Homer
  • 458
  • 4
  • 17
6
votes
3 answers

django-oauth-toolkit : Customize authenticate response

I am new to Django OAuth Toolkit. I want to customize the authenticate response. My authenticate url configuration on django application is : url('authenticate/', include('oauth2_provider.urls',…
5
votes
1 answer

How to implement google and facebook oauth2 in django rest framework?

I am a nodejs developer but currently migrating to django(being a python lover). I am trying to implement OAuth2 in Django Rest Framework but I don't know how to start. In nodejs, there is passportjs library which is well maintained, and it's got…
ahmed osama
  • 430
  • 1
  • 5
  • 16
5
votes
1 answer

How can I get the current logged in user from a django-oauth-toolkit token?

I'm using Django and django-oauth-toolkit to build a generic OAuth2 Authorization Server for Auth0. I plan to use the Django server to authenticate users to several different services, using Auth0 as an intermediary. I have a view that is called…
Jon Buys
  • 507
  • 5
  • 15
4
votes
2 answers

When to use OAuth in Django? What is its exact role on Django login framework?

I am trying to be sure that I understand it correctly: Is OAuth a bridge for only third party authenticator those so common like Facebook, Google? And using it improves user experience in secure way but not adding extra secure layer to Django login…
4
votes
6 answers

Hide the token table from the admin panel in Django REST Framework

I'm using Django REST Framework and Django-OAuth-toolkit to enable OAuth2 authentication in my application. Since after using OAuth2, I no more need token-based authentication and hence no token table/model. Sometimes it makes me confused after…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
4
votes
1 answer

Getting Permissions issue on sending the authenticated request to OAuth2.0 Django rest Framwork

I Have integrated the OAuth2.0 with django-rest-framework. When I send the authenticated request to my class based view I got this { "detail": "You do not have permission to perform this action." } settings.py REST_FRAMEWORK = { …
4
votes
0 answers

Introspection endpoint with django oauth toolkit

Django OAuth toolkit recently added ability to separate the provider and resource servers using Introspection endpoint. However, the documentation is not clear on how to properly achieve this. Anyone who has successfully done this?
nyabwana
  • 41
  • 3
4
votes
1 answer

Django OAuth Toolkit: could not import ext.rest_framework

I am trying to set up OAuth2 authentication system for my Django REST API (using DjangoRestFramework and Django-Oauth-Toolkit). I wrote everything according to the official documentation, but the system gives error "could not import…
funtik
  • 1,688
  • 3
  • 11
  • 27
4
votes
3 answers

django-oauth2-provider with custom user model?

I am really stuck in my project right now. I am trying to implement Oauth2 for my app. I found out about django-oauth2-provider a lot and tried it. The only problem is, it uses the User model at django.contrib.auth. The main users of our site are…
suzzant
  • 133
  • 1
  • 6
1
2 3 4 5 6 7