Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Motivation: The current self-hosted version supports authentication through Google, GitHub, and local accounts. However, to provide a more flexible and comprehensive authentication solution, we propose integrating a Generic OAuth2. This integration enhances the versatility and scalability of the self-hosted version, making it more adaptable to diverse environments and user needs.
This pull request introduces support for a new custom OAuth flow, including backend and frontend changes. The most important changes include adding new API endpoints, updating the OAuth configuration, and modifying the frontend login page to support the custom OAuth provider.
Backend Changes:
openapi.yaml
anduser.yaml
. ([[1]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-97b387589242cdf48a7b66f4daa27066a206a9dcd8659d8587740c904aaa1ce7R43-R46)
,[[2]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-c9b0ba958712a3995a7c08989693bf7ddc047f2ada30416b359c158d444ad0f9R180-R209)
)custom_oauth_callback.go
. ([api/v1/server/handlers/users/custom_oauth_callback.goR1-R171](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-efb7cb724507a0ef56ab3cc46321b34c90f4092cf4e0b7f7e27a6f4317915ed5R1-R171)
)custom_oauth_start.go
. ([api/v1/server/handlers/users/custom_oauth_start.goR1-R30](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-dd6f0cfcf68493068af113851e0eb93db747cc84ec34f24b0c926da594a1eac2R1-R30)
)configs.go
. ([[1]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-0a89e2dc1668b45a0c13a724b8370395c6ba7858fc2e056b4dbe3c2294609922R14-R18)
,[[2]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-0a89e2dc1668b45a0c13a724b8370395c6ba7858fc2e056b4dbe3c2294609922R66-R78)
)Frontend Changes:
index.tsx
. ([[1]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-58fcbd495ec97f2dcd23d93ae89964a861312c6ad7e57e77581aabb6ecbbd561R26-R33)
,[[2]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-58fcbd495ec97f2dcd23d93ae89964a861312c6ad7e57e77581aabb6ecbbd561R45)
,[[3]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-58fcbd495ec97f2dcd23d93ae89964a861312c6ad7e57e77581aabb6ecbbd561R161-R170)
)Other Changes:
[[1]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-5dae58817d67249465ccd577680efbe209af6efd05e69414732d6e1e5f273b34L4-R4)
,[[2]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-a7b46e898d2bf451ca3ddef8aec670eaf3819e194f660c19dac9da4f2548edc5L4-R4)
,[[3]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-4aad7ea9705bab7520e2aebcf18514f535b747ca161334b11d5a3c0f7e8fe46eL4-R4)
,[[4]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-6b1d5f75ca8e6540cb6248394678ed3e41631a394681e9b69bb14fd356a96b9cL4-R4)
,[[5]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-ee2f134689e37199fade5382ed922d587113363950401bf11f36a6b377644e65L4-R4)
,[[6]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-379298bd2027b3e847425ab728ebd7d083ea09afcae68991e1a4db672c075d07L4-R4)
)gen.go
. ([[1]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-984209ef99f3799ba42a3c327662ca8344b5a2e5cda37abc31040e0aff2c9a58R2129-R2134)
,[[2]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-984209ef99f3799ba42a3c327662ca8344b5a2e5cda37abc31040e0aff2c9a58R3277-R3300)
,[[3]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-984209ef99f3799ba42a3c327662ca8344b5a2e5cda37abc31040e0aff2c9a58R7531-R7584)
,[[4]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-984209ef99f3799ba42a3c327662ca8344b5a2e5cda37abc31040e0aff2c9a58R8751-R8756)
,[[5]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-984209ef99f3799ba42a3c327662ca8344b5a2e5cda37abc31040e0aff2c9a58R10533-R10574)
,[[6]](https://github.com/hatchet-dev/hatchet/pull/1139/files#diff-984209ef99f3799ba42a3c327662ca8344b5a2e5cda37abc31040e0aff2c9a58R11894-R11911)
)Added following env values:
Type of change