mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
feat: add auth via google
This commit is contained in:
@@ -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,
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user