Skip to content

Commit

Permalink
another fix to iframe integration code
Browse files Browse the repository at this point in the history
  • Loading branch information
parsa-asgari committed Apr 28, 2024
1 parent d36111d commit 5e16188
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/sign-in/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default async function SignInPage({
if (process.env.DEBUG_MODE) console.log("DEBUG MODE - IFRAME ===> TOKEN: ", token)
const url = `${process.env.IFRAME_AUTH_API_BASE_URL}/${process.env.IFRAME_AUTH_API_PATH_URL}`
const iframe_auth_response = await fetch(url, {
method: 'POST',
method: 'GET',
headers: { Authorization: `Bearer ${token}` }
})
const iframe_auth_response_json = await iframe_auth_response.json()
Expand Down
8 changes: 2 additions & 6 deletions components/login-form-searchparams.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import * as React from 'react'
import { createClientComponentClient } from '@supabase/auth-helpers-nextjs'
import { createClient } from '@/utils/supabase/client'
import { useRouter } from 'next/navigation'
import { useEffect, useState } from 'react'

Expand All @@ -16,11 +16,7 @@ export function LoginFormSearchParams({
}: LoginFormProps) {
const [Session, setSession] = useState(0)
const router = useRouter()
const supabase = createClientComponentClient({
supabaseUrl:process.env.NEXT_PUBLIC_SUPABASE_URL,
supabaseKey:process.env.SUPABASE_SERVICE_ROLE_KEY,
cookieOptions: {domain: '', secure: 'true', maxAge: 604800, path: '', sameSite: 'None'}
})
const supabase = createClient()
// old: maxAge 900000
const BizGPTOrganization = process.env.BIZGPT_ORGANIZATION
const email = `user_${user_id}@${BizGPTOrganization}.com`
Expand Down

0 comments on commit 5e16188

Please sign in to comment.