mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-05 11:06:29 +00:00
update opengraph
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user