User API keys: payload and existing query string leads to a double question mark

If I call user-api-key/new with an auth_redirect already containing a query string (e.g. http://localhost:30120/auth-discourse?state=BASE64), I end up with a redirect URI along the likes of http://localhost:30120/auth-discourse?state=BASE64?payload=PAYLOAD - two query strings, and no & appending.

This code might need to be changed to check if there’s already a query string in the URI, or perhaps use some URI builder?

1 Like

It does seem like the assumption the code makes is that it doesn’t already contain any query parameters. We’d be open to a PR to fix this.


I have opened PR for this issue here:


PR has been merged. This topic can be closed :smile: