Overview

This is a memo about important considerations when using sidebase/nuxt-auth in a production environment.

sidebase/nuxt-auth is an authentication module for Nuxt 3 applications.

https://github.com/sidebase/nuxt-auth

Problem

When deploying to Vercel or AWS Amplify, a server error occurred with the following message.

AUTH_NO_ORIGIN:No`origin`-thisisanerrorinproduction,seehttps://sidebase.io/nuxt-auth/resources/errors.Youcanignorethisduringdevelopment

Solution

The following was helpful.

https://github.com/sidebase/nuxt-auth/issues/613

By providing baseURL as shown below, the above error was resolved.

aut}h,:{baseURL:process.env.AUTH_ORIGIN,

Upon reviewing again, I found that this was documented at the following link, but it was not easy to find.

https://sidebase.io/nuxt-auth/configuration/nuxt-config#provider-authjs-baseurl

Summary

I hope this is helpful for those experiencing the same issue.