ory / elements

Ory Elements is a component library that makes building login, registration and account pages for Ory a breeze. Check out the components library on Chromatic https://www.chromatic.com/library?appId=63b58e306cfd32348fa48d50
https://ory.sh
Apache License 2.0
84 stars 41 forks source link

fix: oidc redirect #169

Open francesconi opened 7 months ago

francesconi commented 7 months ago

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

Further comments