Wildcards allowed in oauth2 redirect urls?

So basically I’m working on my own world of warcraft tracker website (https:// wowtrack gg ) which uses oauth 2 to let users login and do stuff.

So basically I’m all good with my production builds as I set the redirect url for the production mode api client (in API Access) as my site has a deterministic url.

The problem is with my development builds. As I do use vercel & next.js, for every commit and PR vercel creates me a preview build which I can navigate to test things out (like https:// wowtrack-1dld8tzng-int6ware . vercel.app / ).

The thing is that every preview build on vercel does have it’s own unique url.

So basically I tried adding a wildcard to my “Redict urls” in api client settings as:

http://localhost:3000/api/auth/callback/battlenet
http://127.0.0.1:3000/api/auth/callback/battlenet
https://*.vercel.app/api/auth/callback/battlenet

but seems it doesn’t accept wildcards as I’m getting an error:

Invalid grant type or callback URL is not valid.

Is there a way to achieve this?

I don’t think it is. What would be the use case for this anyway ?

Usually people handle the Authentication on the same callback and then redirect the user to the original desired URL.