mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 12:36:57 +00:00
Save and use user's locale preference
This commit is contained in:
@@ -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;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user