const REDIRECT = "oidcRedirect" ; const SILENT_REDIRECT = "oidcSilentRedirect" ; export function getRedirectUrl ( baseRedirectUrl ) { return appendSearchParam ( baseRedirectUrl , REDIRECT ) ; } export function isRedirectPage ( ) { return currentUrlHasSearchParam ( REDIRECT ) ; } export function getSilentRedirectUrl ( baseRedirectUrl ) { return appendSearchParam ( baseRedirectUrl , SILENT_REDIRECT ) ; } export function isSilentRedirectPage ( ) { return currentUrlHasSearchParam ( SILENT_REDIRECT ) ; } function appendSearchParam ( baseUrl , param ) { const baseURL = new URL ( baseUrl ) ; baseURL . searchParams . append ( param , "true" ) ; return baseURL . toString ( ) ; } function currentUrlHasSearchParam ( param ) { const url = new URL ( window . location . href ) ; return url . searchParams . has ( param ) ; }