fix: callback url (#5372)
Co-authored-by: Alex van Andel <me@alexvanandel.com>
This commit is contained in:
1 parent
db9911a264
commit
acad0619f5
1 file changed
+6
-7
@@ -54,12 +54,11 @@ export default function Signup({ prepopulateFormValues }: inferSSRProps<typeof g
|
||||
method: "POST",
|
||||
})
|
||||
.then(handleErrors)
|
||||
.then(
|
||||
async () =>
|
||||
await signIn("Cal.com", {
|
||||
callbackUrl: (`${WEBAPP_URL}/${router.query.callbackUrl}` || "") as string,
|
||||
})
|
||||
)
|
||||
.then(async () => {
|
||||
await signIn("Cal.com", {
|
||||
callbackUrl: router.query.callbackUrl ? `${WEBAPP_URL}/${router.query.callbackUrl}` : WEBAPP_URL,
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
methods.setError("apiError", { message: err.message });
|
||||
});
|
||||
@@ -143,7 +142,7 @@ export const getServerSideProps = async (ctx: GetServerSidePropsContext) => {
|
||||
// no token given, treat as a normal signup without verification token
|
||||
if (!token) {
|
||||
return {
|
||||
props,
|
||||
props: JSON.parse(JSON.stringify(props)),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user