elements icon indicating copy to clipboard operation
elements copied to clipboard

fix: oidc redirect

Open francesconi opened this issue 2 years ago • 0 comments

The following statement in line 125 is not correct. When I log in via OIDC, I get redirected to:

"redirect_browser_to": "https://login.microsoftonline.com/<tenant_id>/oauth2/v2.0/authorize?client_id=<client_id>&login_hint=daniel.francesconi%40hgv.it&redirect_uri=https%3A%2F%2Fapi.accounts.hgv.it%2Fself-service%2Fmethods%2Foidc%2Fcallback%2Fmicrosoft&response_type=code&scope=https%3A%2F%2Fgraph.microsoft.com%2FUser.Read+openid&state="

Then, in line 135 the hostname login.microsoftonline.com is replaced with localhost:3000, generating the following URL:

"http://localhost:3000/<tenant_id>/oauth2/v2.0/authorize?client_id=<client_id>&login_hint=daniel.francesconi%40hgv.it&redirect_uri=https%3A%2F%2Fapi.accounts.hgv.it%2Fself-service%2Fmethods%2Foidc%2Fcallback%2Fmicrosoft&response_type=code&scope=https%3A%2F%2Fgraph.microsoft.com%2FUser.Read+openid&state=<state>"

As a result, I am no longer properly redirected, and instead, a blank page is displayed.

Related Issue or Design Document

Checklist

  • [x] I have read the contributing guidelines and signed the CLA.
  • [ ] I have referenced an issue containing the design document if my change introduces a new feature.
  • [x] I have read the security policy.
  • [x] I confirm that this pull request does not address a security vulnerability. If this pull request addresses a security vulnerability, I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
  • [ ] I have added tests that prove my fix is effective or that my feature works.
  • [ ] I have added the necessary documentation within the code base (if appropriate).

Further comments

francesconi avatar Dec 07 '23 08:12 francesconi