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.

4 Likes

I have opened PR for this issue here:

2 Likes

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

2 Likes