nextjs-basic-auth
nextjs-basic-auth copied to clipboard
add return promise function checkBasicAuth
Thank you for the nice repo!
Add return promise so the below await would really work.
// some-route.js export async function getServerSideProps(ctx) { const {req, res} = ctx
await basicAuthCheck(req, res)
return { props: {} } }