Skip to content

Improve stability #5

Merged
TheOtterlord merged 2 commits intoTheOtterlord:mainfrom
nowaythatworked:main
Jan 18, 2023
Merged

Improve stability #5
TheOtterlord merged 2 commits intoTheOtterlord:mainfrom
nowaythatworked:main

Conversation

@nowaythatworked
Copy link

Just a small PR to improve readability and such.
I removed the trustAuth by env vars for the getSession method and hardcoded as true. I guess this is the expected behavior.
Also I didn´t like all the comments so I put the vars in one line.

// @ts-expect-error
import.meta.env.NODE_ENV !== "production"
)
options.trustHost ??= true
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is inline with what the other packages are doing

// @ts-expect-error import.meta.env is used by Astro
authConfig.secret ??= import.meta.env.AUTH_SECRET
// @ts-expect-error
const { AUTH_SECRET, AUTH_TRUST_HOST, VERCEL, NODE_ENV } = import.meta.env
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much tidier :D

@TheOtterlord TheOtterlord merged commit e2f6658 into TheOtterlord:main Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants