I am creating an SPA(Angular 10) that would get the access token from OKTA using Okat-Auth-JS, as we want to use Material login form.
We then want to save the user data received after logging into the database.
We’re using Couchbase and we need a unique identifier to be used to create the document key stored in the db.
My question is, would it be a good practice to use the “sub” from the claims to achieve this, or is it good practice to store the value of “sub” in the database.
Request you to please help me out with it.