pkpkpk
June 11, 2020, 1:59pm
1
Let’s say I want to build ToDo app with Okta authentication.
I need to store users’ tasks in the relational database.
The user has to have the ability to query only his tasks.
What user property should I use as a user identifier in my database?
In access token, I can see claims like uid and sub which seems to be suitable for my needs.
Unfortunately, both of them are strings instead of numeric values.
Using them as tables’ primary key seems like a very inefficient idea.
Could you recommend a better way of achieving my goal?
Sub is usually the best value to use. It’s a unique identifier.
pkpkpk
June 12, 2020, 7:46am
3
The ‘sub’ claim is the user’s email. I is immutable?
dragos
June 17, 2020, 12:53am
4
Hi @pkpkpk
The sub
claim inside the ID token represents the user’s Okta ID and it’s immutable.
For the acces token, the sub
claim represents the “Username” field that is populated for the user under Admin >> Applications >> application >> Assignments >> user >> pencil icon.
system
Closed
January 24, 2024, 8:05pm
5
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.