[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token Does Not Refresh #30

Open
eu2pey4 opened this issue Mar 28, 2023 · 0 comments
Open

Token Does Not Refresh #30

eu2pey4 opened this issue Mar 28, 2023 · 0 comments

Comments

@eu2pey4
Copy link
eu2pey4 commented Mar 28, 2023

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.')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant