Skip to content

Commit

Permalink
feat(middleware): enable global auth check
Browse files Browse the repository at this point in the history
  • Loading branch information
brucetony committed Jul 4, 2024
1 parent 47a27a0 commit 7a72936
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 40 deletions.
7 changes: 0 additions & 7 deletions middleware/auth.ts

This file was deleted.

4 changes: 2 additions & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ export default defineNuxtConfig({
},
},
session: {
expirationCheck: true,
expirationCheck: false,
automaticRefresh: true,
maxAge: 3600,
},
middleware: {
globalMiddlewareEnabled: false,
globalMiddlewareEnabled: true,
customLoginPage: false,
},
},
Expand Down
7 changes: 1 addition & 6 deletions pages/about.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<script setup lang="ts">
definePageMeta({
// or middleware: 'auth'
middleware: ["auth"],
});
</script>
<script setup lang="ts"></script>

<template>
<p>
Expand Down
5 changes: 0 additions & 5 deletions pages/analyses.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<script setup lang="ts">
import AnalysesTable from "~/components/analysis/AnalysesTable.vue";
definePageMeta({
// or middleware: 'auth'
middleware: ["auth"],
});
</script>

<template>
Expand Down
5 changes: 0 additions & 5 deletions pages/data-stores/create.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<script setup lang="ts">
import DataStoreCreator from "~/components/data-stores/DataStoreCreator.vue";
import ProjectBinder from "~/components/data-stores/ProjectBinder.vue";
definePageMeta({
// or middleware: 'auth'
middleware: ["auth"],
});
</script>

<template>
Expand Down
5 changes: 0 additions & 5 deletions pages/data-stores/index.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<script setup lang="ts">
import DataStoreTable from "~/components/data-stores/DataStoreTable.vue";
definePageMeta({
// or middleware: 'auth'
middleware: ["auth"],
});
</script>

<template>
Expand Down
5 changes: 0 additions & 5 deletions pages/projects.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<script setup>
import ProjectTable from "~/components/projects/ProjectTable.vue";
definePageMeta({
// or middleware: 'auth'
middleware: ["auth"],
});
</script>

<template>
Expand Down
5 changes: 0 additions & 5 deletions pages/proposals.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<script setup lang="ts">
import ProposalTable from "~/components/projects/ProposalTable.vue";
definePageMeta({
// or middleware: 'auth'
middleware: ["auth"],
});
</script>

<template>
Expand Down

0 comments on commit 7a72936

Please sign in to comment.