Back
OIDC Auth Issues: Invalid Redirect and callback/redirect after authentication is missing port number
- 0
- Self Hosted
- Auth
- Web
xStar37
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. Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...