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
2
votes
1 answer

django-oauth-toolkit to issue a JWT token

Tech Stack Django1.10.8 + Python3.6 + docker + React + Axios.js I have a situation where I need to make a server to server call and for this I am using Django-OAuth-toolkit. How can I convert this token to issue JWT token instead? { …
djangobot
  • 257
  • 1
  • 2
  • 11
2
votes
2 answers

"error": "invalid_client" django-oauth-toolkit

I am using django rest framework with django-oauth-toolkit. When i request access token on my localhost it gives me the access token as shown below ~/django_app$ curl -X POST -d "grant_type=password&username=&password="…
Aadil Shaikh
  • 389
  • 1
  • 5
  • 22
2
votes
0 answers

DjangOAuthToolkit - How to have different read/write scope for a View?

I'm using DRF and OAuthToolkit. Here is my view:- class UserDetailView(RetrieveUpdateDestroyAPIView): serializer_class = UserUpdateSerializer permission_classes = [TokenHasResourceScope] required_scopes = ['user_detail'] Now, the above…
Praful Bagai
  • 16,684
  • 50
  • 136
  • 267
2
votes
1 answer

'type' object is not iterable with Django Rest Framework and django oauth2-toolkit

Well I am trying to create new access token for the login user on creation with custom authentication class in views. Serializer.py class UserCreateSerializer(ModelSerializer): def create(self, validated_data): user =…
sri ganesh
  • 71
  • 1
  • 9
2
votes
1 answer

Integrate Django Oauth Toolkit urls correctly

I followed the instructions from the official django-oauth toolkit doc (https://django-oauth-toolkit.readthedocs.io/en/latest/tutorial/tutorial_02.html) and included all oauth-toolkit urls manually to prevent users from creating applications. In my…
2
votes
1 answer

Client Authentication in Django rest framework powered App using django-oauth-toolkit

I am creating a project in django for my mobile app. The django project is the API backend for the mobile App. I have created a signup for the user model using django rest framework. The signup API works fine. Now, i want to let only the request…
2
votes
1 answer

Django oauth toolkit: migrate gives type error - getting started tutorial

I am trying to follow the getting started tutorial for django oauth toolkit from: https://django-oauth-toolkit.readthedocs.io/en/latest/rest-framework/getting_started.html When I run migrate, I get this error: File…
leferaycloud
  • 83
  • 1
  • 5
2
votes
1 answer

Django OAuth Toolkit examples not working

I am trying to test OAuth2 authentication using Django 1.11.4 and Django OAuth Toolkit. After following the tutorial (like, literally verbatim) the consumer application on heroku refuses to exchange the code generated in order to grant me an…
jtimz
  • 324
  • 3
  • 14
2
votes
1 answer

Django rest api Change oauth response error format

I have successfully implemented oauth2 for my django rest api project. I want to change the error response format of the login api. Current error response is { "error_description": "Invalid credentials given.", "error": "invalid_grant" } I…
2
votes
0 answers

How to get Rails to use an OAuth2 provider based on django-oauth-toolkit

I'm trying to get a Rails app to use an external OAuth2 provider that I set up using django-oauth-toolkit. I'm using the omniauth-oauth2 strategy as a base and set up my own local URLs for the authentication and token URLs.…
2
votes
1 answer

How to login with mobile/otp using Django Oauth Toolkit

We are using Django OAuth Toolkit with DRF(Django Rest Framework). Now, we want to provide login with mobile number. To authenticate we'll use OTP(One Time Password). How can this be achieved? One solution is to directly create auth-token which…
Kumar Nitin
  • 1,845
  • 2
  • 16
  • 21
1
vote
1 answer

Django Google log-in/sign up not working even though django-oauth

Following this guide to add google sign-in/sign-up to my django app. Added all the code and it all seemed to be working until the very end when I got this error. Error 400: redirect_uri_mismatch The redirect URI in the request,…
giaggi
  • 542
  • 5
  • 16
1
vote
1 answer

Django Oauth Toolkit: User data over introspection

Current Scenario: I'm using Introspect to validate access token on the authentication server. This call returns only 'username' of the user from the authentication server and saves it in the resource server. The Id of the same user on the…
Usoof
  • 650
  • 1
  • 5
  • 19
1
vote
0 answers

Django Rest framework as Single Sign On

I have created DRF application with Django OAuth Toolkit (DOT) Rest Application with oAuth2 flow. I was planning to use these api's as Single Sign On (SSO). For javascript client it is working fine with "authorization_code" grant type which is…
1
vote
1 answer

Django OAuth - Include Authorization Header in Middleware?

I configured django-oauth-toolkit successfully. I want to authorize third party users after receiving an access token from an OAuth Provider. I am able to access restricted websites with it using it like this after saving it in the Django Admin:…
Juanvulcano
  • 1,354
  • 3
  • 26
  • 44