amirA
Convex Community15mo ago
42 replies
amir

Convex Auth JWT Subject

Hey guys, I noticed that every time I
signOut
and then
signIn
again, the
sub
field in my JWT token changes
The first part is remaining constant which is the
userId
but then the second part is changing.

For example:
Initialy when I logged in the
sub
field in decoded JWT token was
k172bx4p67v9qdhtac9n508ckn76vs10|jn73yr27ask6fsjjs8mzr4xhm576tczh

After I signed out and signed in again it became
k172bx4p67v9qdhtac9n508ckn76vs10|jn77eveqqnxdw9c78shea6r26s76vynz


where
k172bx4p67v9qdhtac9n508ckn76vs10
is the user id

I need a constant, non-changing sub field. Is it possible to do that?
Was this page helpful?