Progress on auth handling

This commit is contained in:
2024-07-29 15:07:14 +02:00
parent 3b23d4dab4
commit 3c2548cd90
19 changed files with 242 additions and 45 deletions

View File

@@ -2,7 +2,7 @@
import CanvasModule from './transformer/canvas/module'
export default defineNuxtConfig({
modules: [CanvasModule, "@nuxt/content", "@nuxtjs/color-mode", "@nuxt/image"],
modules: [CanvasModule, "@nuxt/content", "@nuxtjs/color-mode", '@sidebase/nuxt-auth'],
components: [
{
@@ -17,6 +17,28 @@ export default defineNuxtConfig({
}
},
auth: {
baseURL: '/api/auth',
provider: {
type: 'local',
//type: 'refresh',
endpoints: {
signIn: { path: '/login', method: 'post' },
signOut: { path: '/logout', method: 'post' },
signUp: { path: '/register', method: 'post' },
getSession: { path: '/session', method: 'get' },
//refresh: { path: '/refresh', method: 'post' }
},
session: {
dataType: {
id: 'string',
username: 'string',
email: 'string',
}
}
}
},
css: ['~/assets/common.css', '~/assets/global.css'],
content: {