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
This commit is contained in:
Tim Möhlmann 2024-03-06 11:29:27 +02:00 committed by GitHub
parent c03c054aea
commit 84f5b9433c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 <http://localhost:8089/auth/callback> and Post redirect URI to <http://localhost:8089/>.
> If you are following along with the [example](https://github.com/zitadel/zitadel-go), set the dev mode to `true`, the Redirect URIs to <http://localhost:8089/auth/callback> and Post-logout redirect URI to <http://localhost:8089/>.
![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