Use sumsub web SDK for KYC form without access token generation #1

Merged
nabarun merged 6 commits from ag-sumsub-integration into kyc-integration 2024-07-25 13:28:23 +00:00
Showing only changes of commit 3b23e769cf - Show all commits

View File

@ -4,19 +4,6 @@ import { useNavigate } from 'react-router-dom';
import { Box, Typography } from '@mui/material'
import SumsubWebSdk from '@sumsub/websdk-react'
const UserVerification = () => {
const [userId, setUserId] = useState<String>('');
const [applicationSubmitted, setApplicationSubmitted] = useState<boolean>(false);
const navigate = useNavigate();
useEffect(()=>{
if (applicationSubmitted) {
navigate(`/sign-with-nitro-key/${userId}`)
}
}, [applicationSubmitted, userId, navigate]);
const config = {
lang: "en", //language of WebSDK texts and comments (ISO 639-1 format)
theme: "light",
@ -27,6 +14,18 @@ const UserVerification = () => {
adaptIframeHeight: true
}
const UserVerification = () => {
const [userId, setUserId] = useState<String>('');
const [applicationSubmitted, setApplicationSubmitted] = useState<boolean>(false);
const navigate = useNavigate();
useEffect(()=>{
if (applicationSubmitted && userId !== '') {
navigate(`/sign-with-nitro-key/${userId}`)
}
}, [applicationSubmitted, userId, navigate]);
// TODO: Implement
const accessTokenExpirationHandler = async () => {
alert("Please renew token");