mirror of https://github.com/boxyhq/jackson.git
Setup link fixes (#2316)
* Add missing success toast * Remove auto routing * Add translation * added TODO --------- Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
This commit is contained in:
parent
241f12b1b0
commit
d410fe2b76
|
@ -73,10 +73,11 @@ const ConnectionList = ({
|
|||
const noConnections = connections.length === 0 && paginate.offset === 0;
|
||||
const noMoreResults = connections.length === 0 && paginate.offset > 0;
|
||||
|
||||
if (connections && setupLinkToken && connections.length === 0) {
|
||||
router.replace(`/setup/${setupLinkToken}/sso-connection/new`);
|
||||
return null;
|
||||
}
|
||||
// TODO: Redirect to create a new connection if there are no connections
|
||||
// if (connections && setupLinkToken && connections.length === 0) {
|
||||
// router.replace(`/setup/${setupLinkToken}/sso-connection/new`);
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// Find the display name for a connection
|
||||
const connectionDisplayName = (connection: SAMLSSORecord | OIDCSSORecord) => {
|
||||
|
|
|
@ -2,7 +2,8 @@ import { useRouter } from 'next/router';
|
|||
|
||||
import { CreateSAMLConnection as CreateSAML, CreateOIDCConnection as CreateOIDC } from '@boxyhq/react-ui/sso';
|
||||
import styles from 'styles/sdk-override.module.css';
|
||||
import { errorToast } from '@components/Toaster';
|
||||
import { errorToast, successToast } from '@components/Toaster';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
||||
interface CreateSSOConnectionProps {
|
||||
setupLinkToken: string;
|
||||
|
@ -11,8 +12,10 @@ interface CreateSSOConnectionProps {
|
|||
|
||||
const CreateSSOConnection = ({ setupLinkToken, idpType }: CreateSSOConnectionProps) => {
|
||||
const router = useRouter();
|
||||
const { t } = useTranslation('common');
|
||||
|
||||
const onSuccess = () => {
|
||||
successToast(t('sso_connection_created_successfully'));
|
||||
router.push({
|
||||
pathname: '/setup/[token]/sso-connection',
|
||||
query: { token: setupLinkToken },
|
||||
|
|
|
@ -277,5 +277,6 @@
|
|||
"id_token_from_oidc_idp": "ID Token (from OIDC Provider)",
|
||||
"access_token_from_oidc_idp": "Access Token (from OIDC Provider)",
|
||||
"session_state_from_oidc_idp": "Session State (from OIDC Provider)",
|
||||
"scope_from_op_error": "Scope (from OIDC Provider)"
|
||||
"scope_from_op_error": "Scope (from OIDC Provider)",
|
||||
"sso_connection_created_successfully": "SSO Connection created successfully"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue