feat: frontend SSO support#3582
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Promptless prepared a documentation update related to this change. Triggered by this PR Added documentation for the new Enterprise SSO feature to the security page, including supported identity providers (Okta, Microsoft Entra, Google Workspace, OneLogin, JumpCloud, and Generic OIDC), configuration instructions, and PKCE support details. Review at https://app.gopromptless.ai/suggestions/eaa9b5a0-cf64-4dbb-a9af-cfd6cd0b32f9 |
mrkaye97
left a comment
There was a problem hiding this comment.
some screenshots would be great too!
| @@ -0,0 +1,175 @@ | |||
| "use client"; | |||
There was a problem hiding this comment.
this looks like a nextjs / ssr thing?
| clientId: info.clientId || "", | ||
| clientSecret: info.clientSecret || "", | ||
| ssoDomain: info.ssoDomain || "", |
There was a problem hiding this comment.
will this work if these are unset? maybe we should throw
| const cloudMetaQuery = useQuery({ | ||
| queryKey: ['cloudmetadata:get'], | ||
| queryFn: async () => { | ||
| const meta = await api.cloudMetadataGet(); | ||
| return meta; | ||
| }, | ||
| staleTime: 1000 * 60, | ||
| }); | ||
| if (!cloudMetaQuery.isError && cloudMetaQuery.data?.data?.ssoEnabled) { | ||
| data?.auth?.schemes?.push('propelauth'); | ||
| } |
There was a problem hiding this comment.
do we not have this somewhere else? maybe i'm getting confused with the new control plane work
|
|
||
| const makeApi = (orgId: string): SsoApi => ({ | ||
| async get() { | ||
| const r = await fetch(`/api/v1/management/organizations/${orgId}/sso`); |
There was a problem hiding this comment.
this feels like it ignores our openapi setup?
| }, | ||
| async upsert(body) { | ||
| const r = await fetch( | ||
| `/api/v1/management/organizations/${orgId}/sso`, |
There was a problem hiding this comment.
same here, maybe I'm missing some prior art in how orgs are set up
| const [isEditingName, setIsEditingName] = useState(false); | ||
| const [editedName, setEditedName] = useState(''); | ||
|
|
||
| // SSO domain state |
There was a problem hiding this comment.
let's remove comments like this
| enabled: !!orgId, | ||
| }); | ||
|
|
||
| const handleAddSsoDomain = async () => { |
There was a problem hiding this comment.
this sort of thing probably needs to be wrapped in useCallback - I'm a bit surprised the linter is okay with it
There was a problem hiding this comment.
I don't think we use that for any of the other handlers on this page at least...
There was a problem hiding this comment.
I would be shocked if we needed all of these new components - we should be able to reuse existing components for all seven of these
| @@ -0,0 +1,199 @@ | |||
| 'use client'; | |||
There was a problem hiding this comment.
still pretty sure we don't need this use client directive - this is a thing for NextJS and TanStack Start and other similar SSR frameworks afaik
Description
Adds frontend support for organization level SSO.
Fixes #3677
Type of change
What's Changed