Callback URLs/Redirect URIs

In OAuth 2.0 authentication, the client—on the user’s behalf—will send the server a client ID, credentials, scopes, and callback URLs—all of which the server needs in order to properly authenticate a client. The callback URLs, also known as redirect URIs, tell the server where to send the user with the proper tokens after authentication.

For purposes within Skuid, you’ll want the user sent back to the Skuid site/org accessing the data. So whether you’re using one of Google’s many APIs, modifying data on an external Salesforce org, or accessing a Sharepoint database, you will need to use your Skuid callback URL for every external data source that uses OAuth 2.0 authentication.

Note that you will be entering your callback URL on the settings page of whatever service you are accessing, such as the Google API Console, the Salesforce Connected App page, or the Dropbox API app page. You will not be entering this URL on any Skuid page.

Constructing callback URLs

Skuid Platform [[]]

For Skuid Platform sites, simply append /auth/oauth/callback to your Skuid site’s domain URL.

Some examples:

  • For https://example-us-trial.skuidsite.com/, use https://example-us-trial.skuidsite.com/auth/oauth/callback
  • For https://gui-construction.skuidsite.com/, use https://gui-construction.skuidsite.com/auth/oauth/callback
  • For https://asgard-talent-management.skuidsite.com/, use https://asgard-talent-management.skuidsite.com/auth/oauth/callback

Skuid on Salesforce [[]]

When using Skuid on Salesforce, the callback URL will depend on several things:

  • Whether or not the Remove Instance Names from URLs critical update is activated
    • If the above critical update is not activated, then the Salesforce org’s instance
  • If set, the Salesforce org’s My Domain
  • Whether the org is a developer edition or sandbox org

Each of these variables will change parts of the callback URL.

There are also different URLs needed based on whether the Skuid page is deployed using the Redirect or skuid:page Visualforce component override method. Because of this, it’s best to enter two callback URLs for Skuid on Salesforce orgs.

To ensure the accuracy of your callback URLs, fill out the form below to generate the appropriate Salesforce callback URLs for your org:

Note

Unsure what your instance and My Domain are? The URL of the Skuid Pages list within the Salesforce Classic layout is a quick way to find the information needed for callback URLs. For example:

https://customMyDomain-dev-ed--skuid.na30.visual.force.com/apex/PageList

From the above URL you can deduce the following:

  • customMyDomain is the My Domain
  • -dev-ed indicates this is likely a developer’s edition org
  • na30 is the instance.

How these URLs are formed [[]]

If the Remove Instance Names critical update is activated, and the org’s My Domain is configured, the callback URLs should be:

  • https://<myDomain>--skuid.visualforce.com/apex/skuid__oauthcallback
  • https://<myDomain>--c.visualforce.com/apex/oauthcallback

If the org’s My Domain is configured, their format should be:

  • https://<myDomain>--skuid.<Instance>.visual.force.com/apex/skuid__oauthcallback
  • https://<myDomain>--c.<Instance>. visual.force.com/apex/oauthcallback

If the org’s My Domain is not configured, then the URLs will be:

  • https://skuid.<Instance>.visual.force.com/apex/skuid__oauthcallback
  • https://c.<Instance>.visual.force.com/apex/oauthcallback

If the org is a developer’s edition or sandbox, the skuid/c section of the URL will be prepended with -dev-ed– or –sandboxName– respectively.

Troubleshooting

“Remove Instance Names” critical update

Because Salesforce’s Remove Instance Names from URLs for Visualforce, Community Builder, Site.com Studio, and Content Files critical update changes the domain name of Visualforce pages within a Salesforce org, it can also affect any callback URLs used by your data sources.

Before activating this critical update for your Salesforce org, ensure that you have added the appropriate, updated callback URLs to all external systems that Skuid uses OAuth to authenticate to.

See the Skuid on Salesforce callback URL generator above, check the Remove Instance Name Critical Update option, and fill out the form.

For example, the following callback URLs included the instance name before activating the update:

  • https://acmecontainers--skuid.eu3.visual.force.com/apex/skuid__oauthcallback
  • https://acmecontainers--c.eu3.visual.force.com/apex/oauthcallback

After enabling the Remove Instance Names… critical update, they would become:

  • https://acmecontainers--skuid.visualforce.com/apex/skuid__oauthcallback
  • https://acmecontainers--c.visualforce.com/apex/oauthcallback

It is important that this can affect any data source that uses the OAuth authentication flow, whether that be an org-to-org Salesforce connection, a Google Drive implementation, any Microsoft service connection, etc. If a data source uses OAuth, it requires callback URLs, and thus those callback URLs must be updated.

Note

  • The above only affects Skuid on Salesforce instances. Skuid Platform sites and their data sources are not affected.
  • This update does not affect the authorize or token endpoint URLs of any data sources.

Changing Salesforce instances

If the Remove Instance Names from URLs critical update is not activated, it’s possible your orgs instance may have changed.

Salesforce occasionally migrates orgs across instances. If your callback URL worked before, but no longer does, ensure that the instance in your Salesforce org URL has not changed.

For example:

https://acmecontainers--skuid.eu3.visual.force.com/apex/skuid__oauthcallback

may become

https://acmecontainers--skuid.eu12.visual.force.com/apex/skuid__oauthcallback