Okta User Info best practices

Hi everyone, I’m creating a site in which posts are displayed along with comments from users. I’d like to display the name of the user along with these comments but I’m unsure of how best to go about it. Currently in my database I store the comment text and uid provided by Okta. So when I retrieve these comments records from the database before passing them to the client I have to call the UserInfo endpoint for each comment? This seems like it would create a lot of unnecessary calls? I could store the name along with the uid but then if a user changes their name this change wouldn’t be reflected. What’s the best approach for this kind of problem?

Hi @Fraser

Depending on the number of users inside your Okta org, you can do requests every now and then to retrieve the user’s username/name etc. and store it locally in order to display it properly and/or update the user’s details locally when they SSO from Okta (eg. based on the ID token’s profile claims).