export const auth = betterAuth({
socialProviders: {
microsoft: {
clientId: process.env.MICROSOFT_CLIENT_ID,
clientSecret: process.env.MICROSOFT_CLIENT_SECRET,
tenantId: process.env.MICROSOFT_TENANT_ID,
redirectUri: process.env.MICROSOFT_REDIRECT_URI,
authority: 'https://login.microsoftonline.com',
scope: ['openid', 'profile', 'email', 'offline_access', 'User.Read'],
prompt: 'select_account',
},
},
session: {
cookieCache: {
enabled: true,
maxAge: 7 * 24 * 60 * 60,
strategy: 'jwe',
refreshCache: true,
version: '1',
},
},
account: {
storeStateStrategy: 'cookie',
storeAccountCookie: true,
},
plugins: [tanstackStartCookies()],
});
export const auth = betterAuth({
socialProviders: {
microsoft: {
clientId: process.env.MICROSOFT_CLIENT_ID,
clientSecret: process.env.MICROSOFT_CLIENT_SECRET,
tenantId: process.env.MICROSOFT_TENANT_ID,
redirectUri: process.env.MICROSOFT_REDIRECT_URI,
authority: 'https://login.microsoftonline.com',
scope: ['openid', 'profile', 'email', 'offline_access', 'User.Read'],
prompt: 'select_account',
},
},
session: {
cookieCache: {
enabled: true,
maxAge: 7 * 24 * 60 * 60,
strategy: 'jwe',
refreshCache: true,
version: '1',
},
},
account: {
storeStateStrategy: 'cookie',
storeAccountCookie: true,
},
plugins: [tanstackStartCookies()],
});