4

I am trying to get a connected app setup to authorize with Salesforce. Our app has a different subdomain for every client so we wouldn't be able to use www.domain.com/callback. What I'd like to be able to do is add wildcards to the callback url so as long as it fit into a certain pattern the callback url would be valid.

I'd like to be use the url below as a callback url:

https://*.domain.com/salesforce/*/callback

I have tried using the above url but it doesn't work. I see this error.

error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration

Is this possible with some other syntax?

1 Answer 1

5

No. Each Connected App must have exactly one callback URL, which cannot contain merge fields or wildcards. This is a security feature. Instead, you'll probably want a single server (e.g. login.domain.com/callback), with a state parameter to determine where to redirect the user to.

1
  • 2
    Spring '15 introduced the ability to have multiple callback URLs, one of which must be matched exactly. Source: Spring '15 Release Notes
    – Mark Pond
    Nov 2, 2016 at 23:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .