required
            const checkPinRequired = async () => {
                try {
                    const response = await fetch(`/api/pin-required`);
                    const { required, length } = await response.json();
                    if (required) {
                        pinLength = length;
                        createPinInputs(length);
                        pinDigits[0].focus();
                    } else {
                        window.location.href = getRedirectUrl();
                  