Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/runtime/composables/authjs/useAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ const getSession: GetSessionFunc<SessionData> = async (getSessionOptions) => {

// Add any new cookie to the server-side event for it to be present on the app-side after
// initial load, see sidebase/nuxt-auth/issues/200 for more information.
if (process.server) {
if (import.meta.server) {
const setCookieValues = response.headers.getSetCookie ? response.headers.getSetCookie() : [response.headers.get('set-cookie')]
if (setCookieValues && nuxt.ssrContext) {
for (const value of setCookieValues) {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/utils/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function joinPathToApiURL (path: string) {
export const navigateToAuthPages = (href: string) => {
const nuxtApp = useNuxtApp()

if (process.server) {
if (import.meta.server) {
if (nuxtApp.ssrContext && nuxtApp.ssrContext.event) {
return nuxtApp.callHook('app:redirected').then(() => {
sendRedirect(nuxtApp.ssrContext!.event, href, 302)
Expand Down