Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Cast the userId as a string

Roland Geider5d029ac31c64
diff --git a/wger/core/api/powersync.py b/wger/core/api/powersync.py
index 17c7be943..300914ae0 100644
--- a/wger/core/api/powersync.py
+++ b/wger/core/api/powersync.py
@@ -42,10 +42,10 @@ def create_token(user_id):
jwk = _private_jwk()
return encode(
{
- 'sub': user_id,
+ 'sub': str(user_id),
'iat': time.time(),
'aud': 'powersync',
- 'exp': int(time.time()) + 300,
+ 'exp': int(time.time()) + 600,
},
jwk,
algorithm=jwk['alg'],