update opengraph

This commit is contained in:
Ichsan Kurniawan
2026-02-09 16:22:14 +07:00
parent 5cbded392a
commit 09ad78ed03
10 changed files with 7 additions and 15 deletions
+2 -13
View File
@@ -17,7 +17,7 @@ async function refreshAccessToken(token: any) {
// If the access token has expired, try to refresh it
try {
// FOR INSECURE SSL (ex: Self Signed Certificates)
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
// process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
// 1. Race Condition Check:
// If we refreshed recently (within 10s), return the current token
@@ -65,17 +65,6 @@ async function refreshAccessToken(token: any) {
export const authOptions: NextAuthOptions = {
// FORCE COOKIE SETTINGS (To fix localhost rejection)
cookies: {
sessionToken: {
name: useSecureCookies ? `__Secure-next-auth.session-token` : `next-auth.session-token`,
options: {
httpOnly: true,
sameSite: 'lax',
path: '/',
secure: useSecureCookies, // strictly false on http://localhost
},
},
},
providers: [
CredentialsProvider({
name: "Credentials",
@@ -85,7 +74,7 @@ export const authOptions: NextAuthOptions = {
},
async authorize(credentials, req) {
// FOR INSECURE SSL (ex: Self Signed Certificates)
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
// process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
const { email, password } = credentials as any;