Fix multiAuth type
getServerSideProps of /login can only return JSON serializable props which will always be strings.
This commit is contained in:
parent
9baf5063e1
commit
fca2ec3e15
|
@ -114,7 +114,9 @@ function setMultiAuthCookies (req, res, { id, jwt, name, photoId }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function pubkeyAuth (credentials, req, res, pubkeyColumnName) {
|
async function pubkeyAuth (credentials, req, res, pubkeyColumnName) {
|
||||||
const { k1, pubkey, multiAuth } = credentials
|
const { k1, pubkey, multiAuth: multiAuthParam } = credentials
|
||||||
|
// multiAuth query param is a string
|
||||||
|
const multiAuth = typeof multiAuthParam === 'string' ? multiAuthParam === 'true' : !!multiAuthParam
|
||||||
try {
|
try {
|
||||||
const lnauth = await prisma.lnAuth.findUnique({ where: { k1 } })
|
const lnauth = await prisma.lnAuth.findUnique({ where: { k1 } })
|
||||||
await prisma.lnAuth.delete({ where: { k1 } })
|
await prisma.lnAuth.delete({ where: { k1 } })
|
||||||
|
|
Loading…
Reference in New Issue