Skip to content

Token Does Not Refresh #30

Open
Open
@eu2pey4

Description

image

Django Version: 3.2
Python Version: 3.9.16
Installed Applications:
['okta_oauth2.apps.OktaOauth2Config',
'webform.apps.WebformConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.contenttypes',
'ajax_datatable']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'okta_oauth2.middleware.OktaMiddleware']

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/okta_oauth2/tokens.py", line 351, in validate_tokens
    validator.validate_token(request.session["tokens"]["id_token"])
  File "/usr/local/lib/python3.9/site-packages/okta_oauth2/tokens.py", line 289, in validate_token
    raise TokenExpired

During handling of the above exception (), another exception occurred:
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/site-packages/okta_oauth2/middleware.py", line 25, in __call__
    redirect_response = validate_or_redirect(self.config, request)
  File "/usr/local/lib/python3.9/site-packages/okta_oauth2/tokens.py", line 370, in validate_or_redirect
    validate_tokens(config, request)
  File "/usr/local/lib/python3.9/site-packages/okta_oauth2/tokens.py", line 357, in validate_tokens
    validator.tokens_from_refresh_token(
  File "/usr/local/lib/python3.9/site-packages/okta_oauth2/tokens.py", line 70, in tokens_from_refresh_token
    result = self.call_token_endpoint(data)
  File "/usr/local/lib/python3.9/site-packages/okta_oauth2/tokens.py", line 167, in call_token_endpoint
    raise TokenRequestFailed(

Exception Type: TokenRequestFailed at /
Exception Value: ('invalid_grant', 'The refresh token is invalid or expired.')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Token Does Not Refresh · Issue #30 · AzMoo/django-okta-auth