Questions tagged [django-oauth-toolkit]
40 questions
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',…

Akila
- 63
- 1
- 6
4
votes
1 answer
Problem authorizing client with django-oAuth-toolkit Authorization Code flow
I have been following the django-oAuth-toolkit documentation. In the Authorization Code step, I have registered an application as shown in the screenshot.
But then the next step is given like this:
To start the Authorization code flow go to this…

Roy
- 1,939
- 1
- 14
- 21
3
votes
1 answer
Django Oauth Toolkit as SSO server
I want to know can we use Django oauth Toolkit (DOT) as SSO server?
I am using Django Rest Framework in backend.
Steps I need to achieve :
On clicking the Login Button in the client server, it redirects to the server asking to authorise.
If…

Viraj Kaulkar
- 301
- 1
- 2
- 15
2
votes
0 answers
How to implement refresh token in django-oauth-toolkit? I'm able to get access_token but the refresh token isn't coming with it
I'm using django-oauth-toolkit with djangorestframework where our partner user will register their application and get application credentials (client id and client secret) which then used to get access token that can be used further to get our…

Shishir Subedi
- 609
- 3
- 10
2
votes
0 answers
Django OAuth Toolkit - Only admin users issue
I'm implementing OAuth in my Django Rest Framework backend with Django OAuth Toolkit so I can grant access (via authorization code) to Google Actions so when my users trigger an action, my backend can search the user resources and send a specific…
2
votes
2 answers
Could not setup django-oauth-toolkit authentication
I'm going to restrict my working rest_framework.views.APIView inherited class, to be visible only by authenticated users.
I made these modifications:
Added authentication_classes and permission_classes to my class:
class TestView(APIView):
…

mahyard
- 1,230
- 1
- 13
- 34
2
votes
2 answers
How do I specify DRF oauth required_scopes in function based api_view?
I'm trying to make my function based rest framework views which use the @api_view decorator with the Django OAuth Rest Framework Toolkit, where I'm using TokenHasScope as the permission_class. However, this needs a mandatory attribute called…

Rajiv Bharadwaj
- 83
- 1
- 4
2
votes
0 answers
Django OAuth Toolkit - AttributeError: get_full_path
I'm trying to setup the token authentication but when I try to get a token, i get this error.
Endpoint is '/o/token/'. When i POST a wrong client_id or a wrong grant_type, i receive the response i expect:
{
"error": "invalid_client"
}
or
{
…

Ben deLux
- 21
- 1
1
vote
1 answer
custom scopes based on application
I am trying to define different scopes for each oauth application in Django-oauth-toolkit.
I realized I can define different scopes on the settings file. But it seems that they apply to every new oauth-application I create.
OAUTH2_PROVIDER = {
…

Duilio
- 876
- 1
- 10
- 15
1
vote
1 answer
django oauth toolkit `or` in required scopes in view
I'm using drf and oauth toolkit with IsAuthenticatedOrTokenHasScope permissions as default. I have a view that contains scopes
required_scopes = ['mod', 'admin'] When users logs into the app he have special groups which define his permission scope.…

Krzysieqq
- 921
- 7
- 10
1
vote
2 answers
Security implications of refresh token grace period
I have an OAuth2 server built with django-oauth-toolkit, and by default, refresh tokens are revoked immediately upon use. This means that if a client requests a new access token using a refresh token but doesn't receive the response due to a network…

jczaplew
- 1,715
- 1
- 17
- 21
1
vote
1 answer
Django OAuth Toolkit - Introspection Request: "Authentication credentials were not provided."
Good morning or afternoon even good evening!
I have been trying to achieve the separating resource server from the auth server using OAuth Toolkit with Django and I got stuck.
Tryed:
First, I have already tried the following:
Follow the tutorial…

Edward Y. Rogers
- 11
- 3
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
1 answer
how to get the userinfo of the authorized user in django oauth2_toolkit?
Basically In oauth2 protocol after authentication, we get the access_token from the token endpoint using the code we got after successfull authentication.
My Concern is how to get the Userinfo.

Dibyajyoti Parida
- 31
- 2
1
vote
0 answers
Integrating Django REST Framework and Django OAuth Toolkit Authentication
I have followed through the documentation on how to integrate both the REST framework and OAuth Toolkit, but when I run a request with a token I receive:
{"detail":"Authentication credentials were not provided."}
Here are my REST…

OpenDataAlex
- 1,375
- 5
- 19
- 39