Skip to content

Commit 61087aa

Browse files
committed
fix: correct login callback and the logout redirect URLs in documentation
The documented callback URLs did not match the actual URLs used by Auth.js. The OAuth redirect URI should be /api/auth/callback/zitadel, not /auth/callback. Additionally, the post-logout redirect URL in .env.example was missing the /api/auth/logout/callback path.
1 parent 44610f4 commit 61087aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ZITADEL_CLIENT_SECRET=""
4444
# The full URL where ZITADEL redirects the user after they have authenticated.
4545
# This MUST exactly match one of the "Redirect URIs" you have configured in
4646
# your ZITADEL application settings.
47-
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback"
47+
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback/zitadel"
4848

4949
# The internal URL within your application where users are sent after a
5050
# successful login is processed at the callback URL.
@@ -54,5 +54,5 @@ ZITADEL_POST_LOGIN_URL="/profile"
5454
# The full URL where ZITADEL redirects the user after they have logged out.
5555
# This MUST exactly match one of the "Post Logout Redirect URIs" configured
5656
# in your ZITADEL application settings.
57-
ZITADEL_POST_LOGOUT_URL="http://localhost:3000"
57+
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
5858

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ You'll need a ZITADEL account and application configured. Follow the [ZITADEL do
3131

3232
> **Important:** Configure the following URLs in your ZITADEL application settings:
3333
>
34-
> - **Redirect URIs:** Add `http://localhost:3000/auth/callback` (for development)
34+
> - **Redirect URIs:** Add `http://localhost:3000/auth/callback/zitadel` (for development)
3535
> - **Post Logout Redirect URIs:** Add `http://localhost:3000/auth/logout/callback` (for development)
3636
>
3737
> These URLs must exactly match what your Hono application uses. For production, add your production URLs.
@@ -74,7 +74,7 @@ ZITADEL_CLIENT_SECRET="your-randomly-generated-client-secret"
7474
7575
# OAuth callback URL where ZITADEL redirects after user authentication. This
7676
# MUST exactly match a Redirect URI configured in your ZITADEL application.
77-
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback"
77+
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback/zitadel"
7878
7979
# URL where users are redirected after logout. This should match a Post Logout
8080
# Redirect URI configured in your ZITADEL application settings.

0 commit comments

Comments
 (0)