Interact with Callback from OKTA

What is the best way to set custom claims after successful login in OKTA. I know that callback
RedirectUri = System.Configuration.ConfigurationManager.AppSettings["okta:RedirectUri"]is performed, but how can I execute code directly after callback?

Not sure I understand your use case. Custom Claims would have been added into the token itself by Okta, presuming you configured the app (if using Org Authorization Server) or the Authorization Server (if using a Custom Authorization Server) to include said claims.