refresh token
This commit is contained in:
@@ -124,15 +124,10 @@ const passwordRules = [
|
||||
];
|
||||
|
||||
const login = async () => {
|
||||
loading.value = true;
|
||||
await signIn({ username: "admin", password: "admin" });
|
||||
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
// Redirigir al dashboard después del login
|
||||
console.log("signIn", signIn);
|
||||
router.push("/");
|
||||
}, 2000);
|
||||
await signIn(
|
||||
{ username: "admin", password: "admin" },
|
||||
{ callbackUrl: "/" },
|
||||
);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
</div>
|
||||
<div>
|
||||
{{ data }}
|
||||
{{ status }}
|
||||
</div>
|
||||
</v-container>
|
||||
</template>
|
||||
@@ -24,7 +25,7 @@ definePageMeta({
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useChuckNorris } from "~/stores/chuck";
|
||||
const norrisStore = useChuckNorris();
|
||||
const { data } = useAuth();
|
||||
const { data, status } = useAuth();
|
||||
|
||||
onMounted(async () => {
|
||||
await norrisStore.getData();
|
||||
|
||||
Reference in New Issue
Block a user