How do I pass a custom attribute to SPA

I am using the React Signin Widget. I have created some custom user attributes and mapped them but they are not showing up on the React side of things. How do I pass a custom attribute?

With a non-SPA application, I have the option to add Attribute Statements, but I am not seeing this as an option with SPA.

Edit: When I look at the Token Preview, I see the information I am after under token, not under id_token. What is the difference and how do I get the token information?

@subs It sound like you can see the information returned in access token under Token Preview?
You can set the custom attributes to id token or access token under Claims.

For the difference, you can refer in the doc to see id token vs access token.

Here is the doc for requesting token with custom claims. You can try to verify in your postman.
https://developer.okta.com/docs/guides/customize-tokens-returned-from-okta/request-token-claim/

Thank you! I was able to retrieve the information that I was looking for.

I also had to enable the following items.

  • Under my application’s General tab > edit General Settings > Application > Allowed Grant Types > check Implicit > check Allowed ID Token with implicit grant type > check Allow Access Token with implicit grant type (depending on which token you are after)

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.