Fakultas Ilmu Komputer UI

Verified Commit fae1571d authored by Giovan Isa Musthofa's avatar Giovan Isa Musthofa
Browse files

[GREEN] Add refresh token to oauth response

parent ad35dc0a
Pipeline #49745 passed with stages
in 3 minutes and 58 seconds
......@@ -9,7 +9,7 @@ from django.utils.translation import gettext_lazy as _
from rest_framework import exceptions, generics, status, views
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework_authlib.tokens import AccessToken
from rest_framework_authlib.tokens import AccessToken, RefreshToken
from urllib.parse import urljoin, quote
from . import (
......@@ -163,7 +163,8 @@ class OAuthAccessTokenView(views.APIView):
data = {
'access': str(AccessToken.for_user(user))
'access': str(AccessToken.for_user(user)),
'refresh': str(RefreshToken.for_user(user)),
return Response(data)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment