car_trader/pages/login.vue

43 lines
1.0 KiB
Vue

<script setup>
definePageMeta({
layout:"custom"
});
const supabase = useSupabaseClient();
//const user = useSupabaseUser();
const handleLogin = () => {
// const { data, error } = supabase.auth.signInWithPassword({
// email: 'pakabu@straso.com',
// password: '',
// 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>