Save and use user's locale preference

This commit is contained in:
Timothy Armes
2024-09-30 14:53:24 +02:00
parent 03f5ea3454
commit ee031588ff
13 changed files with 467 additions and 367 deletions
+8
View File
@@ -31,4 +31,12 @@ export const {
pages: {
signIn: "/auth/sign-in",
},
callbacks: {
session: async ({ session, user }) => {
// Add the user's local to the session oject
session.user.locale = user.locale;
return session;
},
},
});