Skip to content

Commit

Permalink
Adding info in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark2307 committed Jan 1, 2025
1 parent 93cccde commit 9ebaf00
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ public String addOktaSso() {
oktaConfig.setAuthorisationServerId(authorisationServerId);
oktaConfig.setOktaDomainUrl(oktaDomain);
oktaConfig.setRedirectUri(redirectUri);
oktaConfig.setAccountId(Context.accountId.get());
String userLogin = getSUser().getLogin();
String domain = userLogin.split("@")[1];
oktaConfig.setOrganizationDomain(domain);

if(!DashboardMode.isOnPremDeployment()){
oktaConfig.setAccountId(Context.accountId.get());
String userLogin = getSUser().getLogin();
String domain = userLogin.split("@")[1];
oktaConfig.setOrganizationDomain(domain);
}
ConfigsDao.instance.insertOne(oktaConfig);

return SUCCESS.toUpperCase();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react'
import CopyCommand from '../../../components/shared/CopyCommand';
import IntegrationsLayout from './IntegrationsLayout';
import { Button, Form, FormLayout, HorizontalStack, LegacyCard, Text, TextField } from '@shopify/polaris';
import { Button, Form, FormLayout, HorizontalStack, LegacyCard, Link, Text, TextField, VerticalStack } from '@shopify/polaris';
import func from "@/util/func"
import settingRequests from '../api';
import SpinnerCentered from "../../../components/progress/SpinnerCentered"
Expand Down Expand Up @@ -135,6 +135,19 @@ function OktaIntegration() {
},[])

const cardContent = "Enable login via Okta SSO in your dashboard."

const useCardContent = (
<VerticalStack gap={"2"}>
<Text>{cardContent}</Text>
<HorizontalStack gap={"1"}>
<Text>Use</Text>
<Link>https://app.akto.io/sso-login</Link>
<Text>for signing into AKTO dashboard via SSO.</Text>
</HorizontalStack>
</VerticalStack>
)


const oktaSSOComponent = (
loading ? <SpinnerCentered /> :
<LegacyCard title="Okta SSO">
Expand All @@ -145,7 +158,7 @@ function OktaIntegration() {

return (
<>
<IntegrationsLayout title="Okta SSO" cardContent={cardContent} component={oktaSSOComponent} docsUrl="https://docs.akto.io/sso/okta-oidc"/>
<IntegrationsLayout title="Okta SSO" cardContent={useCardContent} component={oktaSSOComponent} docsUrl="https://docs.akto.io/sso/okta-oidc"/>
<DeleteModal showDeleteModal={showDeleteModal} setShowDeleteModal={setShowDeleteModal} SsoType={"Okta"} onAction={handleDelete} />
</>
)
Expand Down

0 comments on commit 9ebaf00

Please sign in to comment.