Skip to main content

Retrieving OAuth Tokens via Datawiza

About 1 min

Within our comprehensive guide, 4: Pass User Attributes, we presented the process of setting up Okta and Auth0 as Identity Providers (IdPs). Furthermore, we demonstrated how to configure these IdPs to transfer first name (firstName of Okta and given_name of Auth0) to the proxied application via HTTP headers. However, the user's application may also require OAuth tokens such as Access Token, ID Token, or Refresh Token. This article offers detailed instructions on how to configure the Datawiza Cloud Management Console to relay these tokens to the user's application.

Configuration in Datawiza Cloud Management Console

Navigate to your application's configuration page, select the Profile tab and click Add new attribute. pass oauth tokens Input dw_access_token into the Attribute field, choose Direct for the Mapping Type, then click Save. pass oauth tokens

NOTE: For the ID token, input dw_id_token. For the Refresh token, input dw_refresh_token.

Proceed to the Mappings tab, enter dw_access_token, then click Save mappings. pass oauth tokens Visit the Attribute Pass tab, click Add New Attribute Pass. pass oauth tokens Choose dw_access_token for the Field, input the header value you wish to store the token in as the Expected (for example, dw_access_token). Select Header as the Type, then click Save. pass oauth tokens

Inspecting Your Token

Alter the upstream to http://localhost:9902, where we furnish an integrated header-based application that can interpret and display request headers. Upon successful login to your IdP, the token will be visible: check oauth tokens