diff --git a/.env.dev b/.env.dev index 86af6a8c..0d49aea7 100644 --- a/.env.dev +++ b/.env.dev @@ -6,7 +6,7 @@ VITE_CAPTCHA_TYPE=reCaptcha VITE_PROJECT_SLUG = ddoxpd VITE_BLOCKS_OIDC_CLIENT_ID = d45f37a6-7f4a-4f38-9a13-06d74531d7ef -VITE_BLOCKS_OIDC_REDIRECT_URI = https://dev-construct.seliseblocks.com/login +VITE_BLOCKS_OIDC_REDIRECT_URI = https://dev-construct.seliseblocks.com/oidc # Build configuration GENERATE_SOURCEMAP=false diff --git a/.env.stg b/.env.stg index c36f2dda..beb9edfe 100644 --- a/.env.stg +++ b/.env.stg @@ -4,6 +4,7 @@ VITE_X_BLOCKS_KEY = eb87bd227c3d45a196de6956ecb93cd0 VITE_CAPTCHA_SITE_KEY=6LckI90qAAAAAK8RP2t0Nohwii1CeKOETsXPVNQA VITE_CAPTCHA_TYPE=reCaptcha VITE_PROJECT_SLUG = dboxup - +VITE_BLOCKS_OIDC_CLIENT_ID = 019dd8a4-ce76-4159-b275-2de5ebe16729 +VITE_BLOCKS_OIDC_REDIRECT_URI = https://stg-construct.seliseblocks.com/oidc # Build configuration GENERATE_SOURCEMAP=false diff --git a/.github/workflows/2_sonar.yml b/.github/workflows/2_sonar.yml index bb26dfd8..5772038f 100644 --- a/.github/workflows/2_sonar.yml +++ b/.github/workflows/2_sonar.yml @@ -87,10 +87,10 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ env.SONARQUBE_HOST }} - - name: SonarQube Quality Gate check - uses: sonarsource/sonarqube-quality-gate-action@v1.2.0 - # Force to fail step after specific time. - timeout-minutes: 5 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ env.SONARQUBE_HOST }} + # - name: SonarQube Quality Gate check + # uses: sonarsource/sonarqube-quality-gate-action@v1.2.0 + # # Force to fail step after specific time. + # timeout-minutes: 5 + # env: + # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + # SONAR_HOST_URL: ${{ env.SONARQUBE_HOST }} diff --git a/src/assets/images/social_media_ownsso.svg b/src/assets/images/social_media_ownsso.svg new file mode 100644 index 00000000..085db726 --- /dev/null +++ b/src/assets/images/social_media_ownsso.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/core/org-switcher/org-switcher.tsx b/src/components/core/org-switcher/org-switcher.tsx index 34592ef5..5d073da9 100644 --- a/src/components/core/org-switcher/org-switcher.tsx +++ b/src/components/core/org-switcher/org-switcher.tsx @@ -44,8 +44,8 @@ export const OrgSwitcher = () => { const userOrganizations = useMemo(() => { if (!data?.memberships?.length) return enabledOrganizations; - const membershipOrgIds = data.memberships.map((m) => m.organizationId); - return enabledOrganizations.filter((org) => membershipOrgIds.includes(org.itemId)); + const membershipOrgIds = new Set(data.memberships.map((m) => m.organizationId)); + return enabledOrganizations.filter((org) => membershipOrgIds.has(org.itemId)); }, [data, enabledOrganizations]); const selectedOrg = currentOrgId diff --git a/src/constant/sso.ts b/src/constant/sso.ts index 19c40179..4f0d0b9a 100644 --- a/src/constant/sso.ts +++ b/src/constant/sso.ts @@ -4,6 +4,7 @@ import googleIcon from '@/assets/images/social_media_google.svg'; import githubIcon from '@/assets/images/social_media_github.svg'; import linkedinIcon from '@/assets/images/social_media_in.svg'; import xIcon from '@/assets/images/social_media_x.svg'; +import ownSSOIcon from '@/assets/images/social_media_ownsso.svg'; export enum SSO_PROVIDERS { google = 'google', @@ -11,6 +12,7 @@ export enum SSO_PROVIDERS { github = 'github', linkedin = 'linkedin', x = 'x', + ownsso = 'ownsso', } export const SOCIAL_AUTH_PROVIDERS: Record = { @@ -65,6 +67,16 @@ export const SOCIAL_AUTH_PROVIDERS: Record = isConfigured: false, configurations: null, }, + ownsso: { + value: SSO_PROVIDERS.ownsso, + label: 'Custom SSO', + description: 'Configure your own SSO provider using OIDC protocols.', + icon: 'own-sso-icon', + imageSrc: ownSSOIcon, + isAvailable: true, + isConfigured: false, + configurations: null, + }, }; export interface IGetSocialLoginEndpointPayload { diff --git a/src/modules/auth/components/signin/signin.tsx b/src/modules/auth/components/signin/signin.tsx index 86188e1d..773b7bb7 100644 --- a/src/modules/auth/components/signin/signin.tsx +++ b/src/modules/auth/components/signin/signin.tsx @@ -8,7 +8,6 @@ import darklogo from '@/assets/images/construct_logo_dark.svg'; import lightlogo from '@/assets/images/construct_logo_light.svg'; import { Link } from 'react-router-dom'; import { useGetLoginOptions } from '../../hooks/use-auth'; -import { SigninOidc } from '../signin-oidc'; export const Signin = () => { const { data: loginOption } = useGetLoginOptions(); @@ -58,7 +57,6 @@ export const Signin = () => { {passwordGrantAllowed && } {isDivider && } {socialGrantAllowed && loginOption && } - {oidcGrantAllowed && loginOption && } );