Fix embarrassing bug in server auth

This commit is contained in:
Marshall Polaris 2022-08-12 20:14:10 -07:00
parent e4239d0122
commit 0f7f55ec0a

View File

@ -179,7 +179,7 @@ export const redirectIfLoggedIn = <P>(
if (fn == null) {
return { props: {} }
} else {
const props = fn(ctx)
const props = await fn(ctx)
console.debug('Finished getting initial props for rendering.')
return props
}
@ -203,7 +203,7 @@ export const redirectIfLoggedOut = <P>(
if (fn == null) {
return { props: {} }
} else {
const props = fn(ctx, creds)
const props = await fn(ctx, creds)
console.debug('Finished getting initial props for rendering.')
return props
}