Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion .env.stg
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 7 additions & 7 deletions .github/workflows/2_sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
47 changes: 47 additions & 0 deletions src/assets/images/social_media_ownsso.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/core/org-switcher/org-switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions src/constant/sso.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ 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',
microsoft = 'microsoft',
github = 'github',
linkedin = 'linkedin',
x = 'x',
ownsso = 'ownsso',
}

export const SOCIAL_AUTH_PROVIDERS: Record<SSO_PROVIDERS, SocialAuthProvider> = {
Expand Down Expand Up @@ -65,6 +67,16 @@ export const SOCIAL_AUTH_PROVIDERS: Record<SSO_PROVIDERS, SocialAuthProvider> =
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 {
Expand Down
2 changes: 0 additions & 2 deletions src/modules/auth/components/signin/signin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -58,7 +57,6 @@ export const Signin = () => {
{passwordGrantAllowed && <SigninEmail />}
{isDivider && <Divider text={t('AUTH_OR')} />}
{socialGrantAllowed && loginOption && <SsoSignin loginOption={loginOption} />}
{oidcGrantAllowed && loginOption && <SigninOidc />}
</div>
</div>
);
Expand Down
Loading