Callback URL configuration for the support of Web Previews or Deploy Preview

We use AWS Amplify to deploy our SPA application and we are trying to work on Web previews for pull requests. It’s not possible to add each and every URL that is generated in Auth0 Application callback URL’s. So I’m looking for the support of wildcard for the callback URL’s.

I’ve read about Wildcard URL placeholders and it says A URL with a valid wildcard will not match a URL more than one subdomain level in place of the wildcard.. But my URL looks as https://pr-13781.d18siu2rjhkxhy.amplifyapp.com.

Now my question is, how can I make this work as this is a standard behavior with any CI provider. I’ve similar experience with Netlify as well. Netlify with Auth0 also have same problem where Deploy Preview URL’s are not worked.

The ability to use wildcards in more than one sub-domain seems to indeed not currently be supported. In addition to that, there’s a general limit in the number of allowed callback URL’s that an application can have (100) so automatically adding URL’s as part of CI could also be an issue if there’s no pruning of existing ones.

For Amplify it seems that it could be possible to configure a custom domain (Automatically create and delete custom sub-domains for your branch deployments with Amplify Console | Front-End Web & Mobile) and then set it up so that the dynamic URL’s would be of the form [dynamic].yourcustomdomain.test.

The above pattern could allow the use of *.yourcustomdomain.test as the allowed callback URL and as such overcome this situation.

I’ve just checked this and only way that works to me was to provide the subdomain with the wildcard such as: https://*.myapp1.somedomain.dev . When I tried just https://*.somedomain.dev for some reason it didn’t work but that’s ok.