vaulttec/sonar-auth-oidc

"?return_to=/projects" seems to be ignoring sonar.web.context

Closed this issue · 2 comments

When I am redirected form my OIDC provider I get returned to {mydomain}/projects, which is not found.

Shouldn't it take the sonar.web.context into account?

I have not found anything in code except:

private static final String OIDC_URL = "/sessions/init/" + OidcIdentityProvider.KEY + "?return_to=/projects";

but this is hardcoding "/projects" I assume it should contain the config.getBaseUrl()?

-->

private static final String OIDC_URL = "/sessions/init/" + OidcIdentityProvider.KEY + "?return_to=" + config.getBaseUrl() + "/projects";

to be correct?

As I am unable to test it right now I did not create a PR yet.

Thanks for spotting that.

Created a PR #56

But did not go through everything so that would be a quick fix