diff --git a/pages/auth/signin.js b/pages/auth/signin.js index 5882000b..747c76cb 100644 --- a/pages/auth/signin.js +++ b/pages/auth/signin.js @@ -182,7 +182,13 @@ export async function getServerSideProps(context) { return toUrlObj.toString(); // Return the full new URL as a string }; - formURL = appendParamsAndPathToNewUrl(context.query.callbackUrl, formURL); + typeof context.query.callbackUrl != "undefined" && + (formURL = appendParamsAndPathToNewUrl( + context.query.callbackUrl, + formURL + )); + + //formURL = appendParamsAndPathToNewUrl(context.query.callbackUrl, formURL); const url = new URL(formURL); // base URL