diff --git a/components/case/representation/index.js b/components/case/representation/index.js index ed88c415..c45243c8 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -603,7 +603,7 @@ let MakeRepresentation = (props) => { diff --git a/pages/api/auth/[...nextauth].js b/pages/api/auth/[...nextauth].js index b32ee5db..4797e73c 100644 --- a/pages/api/auth/[...nextauth].js +++ b/pages/api/auth/[...nextauth].js @@ -155,14 +155,7 @@ const authOptions = (locale, req) => { const personalisation = { "emailAddress": email, "signInLink": url, - "signInLink": - newURL + - "/api/auth/callback/email?callbackUrl=" + - encodeURIComponent(newURL) + - "&token=" + - searchParams.get("token") + - "&email=" + - encodeURIComponent(email), + "linkExpiry": 10 * 60, }; const reference = "PEDW-SIGNIN"; @@ -220,19 +213,21 @@ const authOptions = (locale, req) => { //console.log(user); return Promise.resolve(session); }, - async redirect({ url, baseUrl }) { - // // Allows relative callback URLs - // if (url.startsWith("/")) return `${baseUrl}${url}`; - // // Allows callback URLs on the same origin - // else if (new URL(url).origin === baseUrl) return url; - let newURL = - locale == "cy" - ? process.env.CY_API_ROOT - : process.env.NEXTAUTH_URL; - //console.log("baseurl:", newURL); - //return baseUrl; - return newURL; - }, + // redirect({ url, baseUrl }) { + // debugger; + // console.log("baseurl:", url, baseUrl); + // // Allows relative callback URLs + // if (url.startsWith("/")) return `${baseUrl}${url}`; + // // Allows callback URLs on the same origin + // else if (new URL(url).origin === baseUrl) return url; + // // let newURL = + // // locale == "cy" + // // ? process.env.CY_API_ROOT + // // : process.env.NEXTAUTH_URL; + + // //return baseUrl; + // // return newURL; + // }, }, }; }; diff --git a/pages/auth/signin.js b/pages/auth/signin.js index fecd8682..305af5f3 100644 --- a/pages/auth/signin.js +++ b/pages/auth/signin.js @@ -43,7 +43,7 @@ const SignIn = (props) => {