From 84f5b9433c402d90272732e5a2d7d4a80ab5ccd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20M=C3=B6hlmann?= Date: Wed, 6 Mar 2024 11:29:27 +0200 Subject: [PATCH] docs: correct usage of key parameter in go login example (#7491) The example was falsely stating that the key was used for a json private key, obtained from zitadel. This lead to confusion as we do not use JWT assertion in the example, but PKCE. Instead, the key is used for symmetric encryption. https://stackoverflow.com/questions/78080163/zitadel-example-go-webapp-encryption-key/78087242#78087242 --- docs/docs/examples/login/go.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/examples/login/go.md b/docs/docs/examples/login/go.md index ef56f448c8..61b55f87fc 100644 --- a/docs/docs/examples/login/go.md +++ b/docs/docs/examples/login/go.md @@ -28,7 +28,7 @@ We recommend that you use [Proof Key for Code Exchange (PKCE)](/apis/openidoauth The Redirect URIs field tells ZITADEL where it's allowed to redirect users after authentication. For development, you can set dev mode to `true` to enable insecure HTTP and redirect to a `localhost` URI. The Post-logout redirect send the users back to a route on your application after they have logged out. -> If you are following along with the [example](https://github.com/zitadel/zitadel-go), set the dev mode to `true`, the Redirect URIs to and Post redirect URI to . +> If you are following along with the [example](https://github.com/zitadel/zitadel-go), set the dev mode to `true`, the Redirect URIs to and Post-logout redirect URI to . ![Create app in console - set redirectURI](/img/go/app-create-redirect.png) @@ -70,7 +70,7 @@ The SDK itself will then register three routes on that to be able to: - start the authentication process and redirect to the Login UI (`/auth/login`) - continue with the authentication process after the login UI (`/auth/callback`) - terminate the session (`/auth/logout`) - - + ```go router.Handle("/auth/", z.Authentication) ``` @@ -119,7 +119,7 @@ https://github.com/zitadel/zitadel-go/blob/next/example/app/templates/profile.ht You will need to provide some values for the program to run: - `domain`: Your ZITADEL instance domain, e.g. my-domain.zitadel.cloud -- `key`: The path to the downloaded key.json +- `key`: Random secret string. Used for symmetric encryption of state parameters, cookies and PCKE. - `clientID`: The clientID provided by ZITADEL - `redirectURI`: The redirectURI registered at ZITADEL - `port`: The port on which the API will be accessible, default it 8089