Questions tagged [django-oauth-toolkit]

40 questions
1
vote
1 answer

Django rest Framework empty response with gunicorn, but works with runserver

I am trying to implement an Oauth2 authentication using django-oauth-toolkit, and the key exchange works when I am using the built-in django server. However, when I am using gunicorn, I have an empty response. All the other endpoints work fine with…
1
vote
1 answer

How to get new access_token from refresh_token using django_oauth_toolkit?

I am using django-oauth-toolkit version 1.1.2 to get access_token as seen below:- Reauest:- POST http://localhost:8597/login { "application_id": "cuOt3raxH9ClbCrbbgP68iU6ssfO2N78TplxwlMq", "username": "test@gmail.com", "password":…
0
votes
1 answer

How to programmatically test Django Auth0 protected api's?

I want to do unit tests for my Django app. I'm using the Django-oauth-toolkit library to protect my views, but I can't test my APIs because they are protected by a Bearer Token. def test_get_meeting_list(self): response =…
0
votes
1 answer

How to edit claims in ID Token supplied with access token in django Oauth toolkit?

When working with Django OAuth Toolkit, using OIDC if you supply openid as the scope in request you get a id_token with access token. This ID Token can initially be used to identify the user you have got access token for and also create a…
Dushyant Deshwal
  • 388
  • 4
  • 17
0
votes
0 answers

Djongo Error = AttributeError: 'Identifier' object has no attribute 'get_parameters'

My system environment. Django==4.1.4 django-oauth-toolkit==2.2.0 djangorestframework==3.14.0 djongo==1.3.6 pymongo==3.12.3 Execute this. python manage.py cleartokens I got this error => AttributeError: 'Identifier' object has no attribute…
sig03
  • 1
  • 1
0
votes
0 answers

ImproperlyConfigured at /oauth/authorize/ This application does not support signed tokens

I'm using django oauth toolkit. When my client react-oidc app makes request to the authority djangoapp_domain/oauth/authorize (In my case localhost:8000/oauth/authorize), I get the error: ImproperlyConfigured at /oauth/authorize/ This application…
0
votes
0 answers

Getting user name in the access token response in Django

I have integrated google social auth in my django + react.js project. I am using the access token that I am getting from google to call this url 'http://localhost:8000/auth/convert-token'. This is giving me a json response which contains the…
0
votes
1 answer

def-spectacular not generate schema urls for django-oauth-toolkit urls

I'm trying to generate Open API schema. settings.py: SPECTACULAR_SETTINGS = { 'TITLE': 'TMC Authentication API', 'DESCRIPTION': 'Description', 'VERSION': '1.0.0', 'SERVE_INCLUDE_SCHEMA': False, 'SWAGGER_UI_DIST': 'SIDECAR', …
0
votes
1 answer

Getting 401 error : "invalid_client" in django-oauth-toolit

I am trying to have an Ouath2 access token based authentication. I am using django-oauth-toolkit for that. I have registered my app on http://localhost:8000/o/applications. However, When I tried to hit the URL http://localhost:8000/o/token/ from…
0
votes
0 answers

Getting {"error": "invalid_grant" } in Django OAUTH when trying to generate a token using AUTHORIZATION CODE FLOW

I'm trying to access token using authorization code flow. I'm using authorization_code as the grant type. Following documentation at Django OAuth Here's my code that's making the post request: curl --location --request POST…
0
votes
0 answers

Django Oauth Toolkit: Change the path when accessing the Applications page

I want to know if I can modify the URL path if I try going the Application page for Oauth2 when I am not logged in. Basically, I want to reuse the Admin login for the user to login and then redirect them to the Application page. # Current…
G.Huan
  • 143
  • 1
  • 7
0
votes
1 answer

Using fetch to get access token from Django OAuth Toolkit

I'm trying to use the fetch API in vanilla JavaScript to generate a token provided by Django OAuth Toolkit. The application I've created in DOT uses the "Resource owner password-based" authorization grant type. My code looks like this (grant_type,…
lapmir
  • 1
  • 1
0
votes
1 answer

Which Authorization Grant to use for Django Oauth2 toolkit?

I am planning to deploy a separate resource server and an authorisation server, both running on django oauth toolkit. Assuming that the clients or the applications using our API services are in the same organization, and will host their frontend to…
0
votes
1 answer

How to add token in response after registering user - DRF Social OAuth2

I am using DRF Social OAuth2 for social authentication, it's giving me the token when I log in, but I want to return the token in response when I register a user with an email and password. How can I do that
0
votes
2 answers

Get User model data in drf-social-oauth2 response after login

So I am using drf-social-oauth2 for authentication and React in the frontend, const handleGoogleLogin = (response) => { setLoading(true); axios .post(`${apiBaseURL}/auth/convert-token`, { token: response.accessToken, …