<script setup>
    definePageMeta({
        layout:"custom"
    });

    const supabase = useSupabaseClient();
    //const user = useSupabaseUser();


    const handleLogin = () => {
        
        // const { data, error } = supabase.auth.signInWithPassword({
        //     email: 'pakabu@straso.com',
        //     password: 'f@FvxwARn%k4Kz@r$qyxo$9RVG7#aGgo7L5S!^As',
        //     redirectTo:"/profile/listings"
        // });
    
        const {error} = supabase.auth.signInWithOAuth({
            provider:"azure",
            options: {
                // scopes: 'offline_access',
                // scopes: 'email',
                // redirectTo: 'confirm',
            },
        });
       
        if (error) {
            //console.log(error);
            msg = error;
        }
    };
</script>

<template>
    <!-- User: [{{  user }}]<br> -->

    <div class="mt-10">
        <h1 class="text-5xl font-bold mb-7">
            Log in
        </h1>
        <button class="bg-red-400 p-3 rounded text-white font-bold" @click="handleLogin">Login</button>
    </div>
</template>