diff --git a/src/App.tsx b/src/App.tsx index 2bc42c4..4b34794 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -21,7 +21,7 @@ export default function App() { const handleSignOut = () => { signOut(); - setSession(null); + window.location.href = '/'; }; if (!session) { diff --git a/src/components/LoginPage.tsx b/src/components/LoginPage.tsx index 934b12c..781fe01 100644 --- a/src/components/LoginPage.tsx +++ b/src/components/LoginPage.tsx @@ -111,7 +111,7 @@ export function LoginPage({ onLogin }: LoginPageProps) { type="email" value={email} onChange={e => setEmail(e.target.value)} - placeholder="you@craze-group.com" + placeholder="you@example.com" required autoFocus className="w-full bg-slate-900 border border-slate-700 rounded-md px-3 py-2.5 text-sm text-white placeholder-slate-500 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500 transition-colors" @@ -157,7 +157,7 @@ export function LoginPage({ onLogin }: LoginPageProps) {

- Access restricted to @craze-group.com accounts + Create an account to get started

diff --git a/src/lib/auth.ts b/src/lib/auth.ts index 525756a..82d29b5 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -1,6 +1,5 @@ const SUPABASE_URL = 'https://hwithddwaapyhnfwcesj.supabase.co'; const SUPABASE_ANON_KEY = 'sb_publishable_fGXkh0bSrAOqSk2jWKAzSg_NJD9YPCv'; -const ALLOWED_DOMAIN = '@craze-group.com'; const SESSION_KEY = 'craze_auth_session'; export interface AuthSession { @@ -9,10 +8,6 @@ export interface AuthSession { } export async function signUp(email: string, password: string): Promise { - if (!email.toLowerCase().endsWith(ALLOWED_DOMAIN)) { - throw new Error(`Only ${ALLOWED_DOMAIN} email addresses are allowed.`); - } - const response = await fetch(`${SUPABASE_URL}/auth/v1/signup`, { method: 'POST', headers: { @@ -29,10 +24,6 @@ export async function signUp(email: string, password: string): Promise { } export async function signIn(email: string, password: string): Promise { - if (!email.toLowerCase().endsWith(ALLOWED_DOMAIN)) { - throw new Error(`Only ${ALLOWED_DOMAIN} email addresses are allowed.`); - } - const response = await fetch(`${SUPABASE_URL}/auth/v1/token?grant_type=password`, { method: 'POST', headers: {