feat: add auth via google

This commit is contained in:
Sonny
2024-04-27 18:14:40 +02:00
committed by Sonny
parent 2531242615
commit df4185bd62
18 changed files with 450 additions and 46 deletions

View File

@@ -11,6 +11,13 @@ export default defineConfig({
*/
sharedData: {
errors: (ctx) => ctx.session?.flashMessages.get('errors'),
auth: async (ctx) => {
await ctx.auth.check();
return {
user: ctx.auth.user,
isAuthenticated: ctx.auth.isAuthenticated,
};
},
},
/**