providers/oauth2: use simpler charset for refresh tokens (#5502)

various implementations might have issues with the special chars

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L 2023-05-07 00:19:11 +02:00 committed by GitHub
parent 8ded11806a
commit 564b2874a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,24 @@
# Generated by Django 4.1.7 on 2023-05-06 16:18
from django.db import migrations, models
import authentik.providers.oauth2.models
class Migration(migrations.Migration):
dependencies = [
(
"authentik_providers_oauth2",
"0015_accesstoken_auth_time_authorizationcode_auth_time_and_more",
),
]
operations = [
migrations.AlterField(
model_name="refreshtoken",
name="token",
field=models.TextField(
default=authentik.providers.oauth2.models.generate_client_secret
),
),
]

View File

@ -382,7 +382,7 @@ class AccessToken(SerializerModel, ExpiringModel, BaseGrantModel):
class RefreshToken(SerializerModel, ExpiringModel, BaseGrantModel):
"""OAuth2 Refresh Token, opaque"""
token = models.TextField(default=generate_key)
token = models.TextField(default=generate_client_secret)
_id_token = models.TextField(verbose_name=_("ID Token"))
@property