Limitations
For this configuration, be aware of the following restrictions:- Only valid OAuth 2.0/OIDC parameters are accepted.
- Not all IdPs support upstream parameters. Check with the specific IdP before you proceed with your implementation.
- IdPs do not support upstream parameters.
Static parameters
Use static parameters to configure your connection to send a standard set of parameters to the IdP when a user logs in. To configure static parameters, call the Auth0 Create a connection or Update a connection endpoint, and pass theupstream_params object in the options object with the parameters you’d like to send to the IdP.
Example: WordPress
WordPress allows you to pass an optionalblog parameter to its authorization endpoint, and automatically request access to a specified blog for users when they log in. To learn more, read WordPress’s OAuth 2.0 documentation.
To follow this example, you’ll need a working WordPress Social connection.
Get the connection
Call the Management API Get a connection endpoint to retrieve the existing values of theoptions object:
options object will look something like this:
Update the connection (static)
Copy the existingoptions object, and then add the upstream_params object with the blog field as an attribute:
options object in the body:
blog=myblog.wordpress.com.
Dynamic parameters
Use dynamic parameters to configure your connection to send a set of parameters with values specific to the user to the IdP when they log in. To configure dynamic parameters, call the Auth0 Management API Create a connection or Update a connection endpoint, pass theupstream_params object in the options object with the parameters you’d like to send to the IdP, and specify the field that the parameter maps to with the alias attribute.
Here’s a sample options object that we’ll revisit later in the X example:
Available fields
These are the available fields for thealias attribute:
acr_valuesaudienceclient_iddisplayid_token_hintlogin_hintmax_agepromptresourceresponse_moderesponse_typeui_locales
Example: X
X allows you to pass an optionalscreen_name parameter to its OAuth authorization endpoint. The screen_name parameter pre-fills the username input box of the login screen with the given value. To learn more, read X’s API reference.
To follow this example, you’ll need a working Twitter Social connection.
Get the connection
Call the Management API Get a connection endpoint to retrieve the existing values of theoptions object:
options object will look something like this:
Update the connection (dynamic)
Copy the existingoptions object, add the upstream_params object with the screen_name field as an attribute, and then set the alias attribute to login_hint:
options object in the body:
Call the login endpoint
When you call the Authentication API Login endpoint for a user, you can pass their email address to thelogin_hint parameter:
screen_name parameter: