damp-secretary-66941
01/12/2022, 2:35 PMkratos
but this same is available on server side?magnificent-energy-493
damp-secretary-66941
01/12/2022, 4:53 PMimport ory from '../../pkg/sdk'
export default async function handler(req, res) {
if (req.method !== 'GET') {
return res.status(405).send('Method Not Allowed')
} else {
ory
.toSession()
.then(({ data }) => {
console.log('Has User', JSON.stringify(data, null, 2))
})
.catch((err) => {
console.log('Has No User', err)
})
return res.status(200).send({ ok: true, message: 'Testing' })
}
}