Livio Spring
8f88c4cf5b
feat: add PKCE option to generic OAuth2 / OIDC identity providers ( #9373 )
...
# Which Problems Are Solved
Some OAuth2 and OIDC providers require the use of PKCE for all their
clients. While ZITADEL already recommended the same for its clients, it
did not yet support the option on the IdP configuration.
# How the Problems Are Solved
- A new boolean `use_pkce` is added to the add/update generic OAuth/OIDC
endpoints.
- A new checkbox is added to the generic OAuth and OIDC provider
templates.
- The `rp.WithPKCE` option is added to the provider if the use of PKCE
has been set.
- The `rp.WithCodeChallenge` and `rp.WithCodeVerifier` options are added
to the OIDC/Auth BeginAuth and CodeExchange function.
- Store verifier or any other persistent argument in the intent or auth
request.
- Create corresponding session object before creating the intent, to be
able to store the information.
- (refactored session structs to use a constructor for unified creation
and better overview of actual usage)
Here's a screenshot showing the URI including the PKCE params:

# Additional Changes
None.
# Additional Context
- Closes #6449
- This PR replaces the existing PR (#8228 ) of @doncicuto. The base he
did was cherry picked. Thank you very much for that!
---------
Co-authored-by: Miguel Cabrerizo <doncicuto@gmail.com>
Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
2025-02-26 12:20:47 +00:00
..
2025-02-26 12:20:47 +00:00
2025-02-13 16:03:05 +00:00
2024-10-07 12:49:55 +00:00
2024-11-14 14:04:39 +00:00
2024-11-14 14:04:39 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2025-02-11 18:45:09 +00:00
2025-02-11 18:45:09 +00:00
2025-02-13 16:03:05 +00:00
2025-02-13 16:03:05 +00:00
2024-04-09 15:15:35 +02:00
2024-12-19 10:37:46 +01:00
2024-12-19 10:37:46 +01:00
2024-09-11 12:04:09 +03:00
2025-01-29 15:12:31 +00:00
2024-09-11 12:04:09 +03:00
2024-12-06 11:32:53 +00:00
2024-08-14 14:18:14 +00:00
2024-08-14 14:18:14 +00:00
2024-02-28 10:55:54 +02:00
2024-09-24 18:43:29 +02:00
2024-09-24 18:43:29 +02:00
2023-12-08 15:30:55 +01:00
2024-08-28 05:33:20 +00:00
2024-09-11 08:24:00 +00:00
2024-09-11 08:24:00 +00:00
2024-09-11 08:24:00 +00:00
2025-02-25 07:33:13 +01:00
2025-02-25 07:33:13 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2024-04-16 11:19:17 +00:00
2024-05-04 11:55:57 +02:00
2024-08-12 22:32:01 +02:00
2024-11-28 10:06:52 +00:00
2023-10-19 12:19:10 +02:00
2023-12-08 15:30:55 +01:00
2024-03-14 09:56:23 +00:00
2025-01-29 15:12:31 +00:00
2025-01-15 09:40:30 +01:00
2024-12-18 16:19:05 +00:00
2024-12-18 16:19:05 +00:00
2025-02-26 12:20:47 +00:00
2025-02-26 12:20:47 +00:00
2023-12-08 15:30:55 +01:00
2024-08-23 06:44:18 +00:00
2024-08-23 06:44:18 +00:00
2024-04-03 10:43:43 +00:00
2024-12-04 18:10:10 +00:00
2024-09-25 21:40:21 +02:00
2023-08-22 10:49:22 +00:00
2023-12-08 15:30:55 +01:00
2025-02-17 19:25:46 +01:00
2024-04-09 20:21:21 +03:00
2025-02-17 19:25:46 +01:00
2024-02-28 10:55:54 +02:00
2024-07-31 18:00:38 +03:00
2024-07-31 18:00:38 +03:00
2024-12-06 11:32:53 +00:00
2024-10-04 13:15:41 +00:00
2024-09-17 11:34:14 +00:00
2024-09-17 11:34:14 +00:00
2024-09-17 11:34:14 +00:00
2024-08-14 14:18:14 +00:00
2024-08-14 14:18:14 +00:00
2023-12-08 15:30:55 +01:00
2024-04-10 09:14:55 +00:00
2024-10-03 17:53:03 +02:00
2023-11-20 17:21:08 +02:00
2024-03-27 15:48:22 +02:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2022-06-14 07:51:00 +02:00
2025-01-15 09:40:30 +01:00
2023-12-08 15:30:55 +01:00
2024-09-11 10:53:55 +00:00
2024-11-11 11:28:27 +00:00
2024-10-28 08:29:34 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-12-19 10:37:46 +01:00
2025-02-13 16:03:05 +00:00
2024-12-19 10:37:46 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-08-22 10:49:22 +00:00
2023-12-08 15:30:55 +01:00
2025-01-29 15:12:31 +00:00
2025-01-15 09:40:30 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2024-08-23 06:44:18 +00:00
2024-12-06 11:32:53 +00:00
2024-11-21 08:05:03 +02:00
2023-12-08 15:30:55 +01:00
2024-10-03 17:53:03 +02:00
2023-12-08 15:30:55 +01:00
2024-10-03 17:53:03 +02:00
2025-02-20 15:39:48 +00:00
2025-01-21 13:31:54 +01:00
2024-05-13 16:01:50 +02:00
2024-05-13 16:01:50 +02:00
2025-01-29 15:12:31 +00:00
2025-01-15 09:40:30 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2025-01-29 15:12:31 +00:00
2025-01-15 09:40:30 +01:00
2023-11-20 17:21:08 +02:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2024-01-25 17:28:20 +01:00
2024-12-06 11:32:53 +00:00
2023-09-15 16:58:45 +02:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-03-27 15:48:22 +02:00
2024-03-27 15:48:22 +02:00
2023-12-06 10:30:56 +00:00
2023-12-08 15:30:55 +01:00
2024-12-19 11:11:40 +00:00
2024-12-19 11:11:40 +00:00
2024-12-19 11:11:40 +00:00
2025-02-13 16:03:05 +00:00
2025-02-13 16:03:05 +00:00
2025-02-13 16:03:05 +00:00
2025-01-29 15:22:22 +02:00
2025-01-29 15:22:22 +02:00
2023-12-08 15:30:55 +01:00
2024-08-13 14:52:43 +02:00
2024-02-28 10:21:11 +00:00
2025-01-14 14:15:59 +01:00
2025-01-29 15:12:31 +00:00
2024-09-26 09:14:33 +02:00
2025-01-29 12:08:20 +00:00
2024-10-04 09:34:44 +00:00
2024-09-12 06:27:29 +02:00
2025-01-16 10:09:15 +00:00
2024-04-09 20:21:21 +03:00
2025-01-16 10:09:15 +00:00
2024-11-28 10:06:52 +00:00
2024-11-28 10:06:52 +00:00
2024-11-28 10:06:52 +00:00
2024-11-28 10:06:52 +00:00
2025-01-29 15:12:31 +00:00
2025-01-02 13:14:49 +00:00
2025-01-30 16:43:13 +01:00
2025-01-29 15:12:31 +00:00
2025-01-29 15:12:31 +00:00
2024-09-24 18:43:29 +02:00
2023-11-20 17:21:08 +02:00
2024-09-24 18:43:29 +02:00
2025-01-21 13:31:54 +01:00
2025-01-21 13:31:54 +01:00
2025-01-29 15:12:31 +00:00
2025-01-29 15:12:31 +00:00
2023-12-08 15:30:55 +01:00
2024-04-05 09:35:49 +00:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2024-08-28 19:46:45 +00:00
2024-08-28 19:46:45 +00:00
2025-01-29 15:12:31 +00:00
2025-02-20 15:39:48 +00:00
2025-01-29 15:12:31 +00:00
2024-04-09 15:15:35 +02:00
2024-06-14 10:00:43 +02:00
2024-06-14 10:00:43 +02:00
2024-08-16 11:41:09 +00:00
2024-08-16 11:41:09 +00:00
2024-08-14 14:18:14 +00:00
2024-08-16 11:41:09 +00:00
2024-08-14 14:18:14 +00:00
2024-08-14 14:18:14 +00:00
2023-11-20 17:21:08 +02:00