From 59540d75c0a28131c6ee887b701daaa2f7f9002c Mon Sep 17 00:00:00 2001 From: srikanth716 Date: Mon, 7 Oct 2024 13:35:05 +0530 Subject: [PATCH] Merge branch 'release-0.10.x' of https://github.com/mosip/inji-verify into develop Signed-off-by: srikanth716 --- inji-verify/src/utils/ovp-utils.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/inji-verify/src/utils/ovp-utils.ts b/inji-verify/src/utils/ovp-utils.ts index 9f3625ad..6f18eb47 100644 --- a/inji-verify/src/utils/ovp-utils.ts +++ b/inji-verify/src/utils/ovp-utils.ts @@ -1,14 +1,13 @@ -import {OvpQrHeader} from "./config"; +import { OvpQrHeader } from "./config"; export const extractRedirectUrlFromQrData = (qrData: string) => { - // qr data format = OVP://payload:text-content - const regex = new RegExp(`^${OvpQrHeader}(.*)$`); - const match = qrData.match(regex); - return match ? match[1] : null; -} + // qr data format = OVP://payload:text-content + const regex = new RegExp(`^${OvpQrHeader}(.*)$`); + const match = qrData.match(regex); + return match ? match[1] : null; +}; export const initiateOvpFlow = (redirectUri: string) => { - const encodedClintIdUrl = window.encodeURIComponent(OvpClientId); - const encodedRedirectUrl = window.encodeURIComponent(window.location.origin); - window.location.href = `${redirectUri}&client_id=${encodedClintIdUrl}&redirect_uri=${encodedRedirectUrl}/redirect`; -} + const encodedOriginUrl = window.encodeURIComponent(window.location.origin); + window.location.href = `${redirectUri}&client_id=${encodedOriginUrl}&redirect_uri=${encodedOriginUrl}/redirect`; +};