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
- Ways to reduce the size that appwrite ta...
Hi, Forgive me for the strange question because I'm not an expert. I have an appwrite selfhosted instance with 200 milion+ docs, the disk usage is 120+ gb Is...
- Validate User Server Side
I want to check if the user has a valid session before fetching data ```import { NextResponse } from 'next/server'; import { Client, Users } from 'node-appwrit...
- How to protect file url
I generate the url to file in NextJS server action. In client component, i use that url as src image. It works fine when I give Any permission! I want to protec...