Back

OIDC Auth Issues: Invalid Redirect and callback/redirect after authentication is missing port number

  • 0
  • Self Hosted
  • Auth
  • Web
xStar37
4 Sep, 2024, 14:15

I am using self hosted Zitadel with OpenID connect. The first error I'm getting is:

TypeScript
    at o.<anonymous> (https://cdn.jsdelivr.net/npm/appwrite@16.0.0:7:7420)
    at Generator.next (<anonymous>)
    at s (https://cdn.jsdelivr.net/npm/appwrite@16.0.0:7:111)```

When I paste the following request url
> https://my.id/oauth/v2/authorize?client_id=0000000000000000%40dev&redirect_uri=http%3A%2F%2Flocalhost%2Fv1%2Faccount%2Fsessions%2Foauth2%2Fcallback%2Foidc%2Fsaas-dev&state=%7B%22success%22%3A%22http%3A%5C%2F%5C%2Flocalhost%3A1337%5C%2F%22%2C%22failure%22%3A%22http%3A%5C%2F%5C%2Flocalhost%3A1337%5C%2F%22%2C%22token%22%3Afalse%7D&scope=openid+profile+email+saas-dev&response_type=code
I get the following as a callback:
> http://localhost/v1/account/sessions/oauth2/callback/oidc/saas-dev?code=sTPUyO5jcH9N68PekVirwpFccKZVw5WYOoTm_1F-3a2qNA&state=%7B%22success%22%3A%22http%3A%5C%2F%5C%2Flocalhost%3A1337%5C%2F%22%2C%22failure%22%3A%22http%3A%5C%2F%5C%2Flocalhost%3A1337%5C%2F%22%2C%22token%22%3Afalse%7D
and  the following redirect:
> http://localhost/v1/account/sessions/oauth2/oidc/redirect?code=sTPUyO5jcH9N68PekVirwpFccKZVw5WYOoTm_1F-3a2qNA&state=%7B%22success%22%3A%22http%3A%5C%2F%5C%2Flocalhost%3A1337%5C%2F%22%2C%22failure%22%3A%22http%3A%5C%2F%5C%2Flocalhost%3A1337%5C%2F%22%2C%22token%22%3Afalse%7D&project=saas-dev
When I add the portnumber to the URL I then get the following error:
> {"message":"Server Error","code":500,"type":"general_unknown","version":"1.5.10"}

Any Ideas what is causing the issue?
TL;DR
Issues with OIDC authentication: - Invalid redirect error when using Zitadel self-hosted with OpenID connect. - Callback/redirect after authentication is missing the port number. - Error message "Server Error" with code 500 when adding the port number to the URL. Possible Solution: Ensure the correct redirect URI with the port number is configured in the OIDC settings to resolve the callback and redirect errors.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more