Never got Microsoft Sign in working, but we have my auth at least
This commit is contained in:
@@ -10,26 +10,11 @@ import { type Id } from './_generated/dataModel';
|
||||
import { action, mutation, query } from './_generated/server';
|
||||
import Password from './CustomPassword';
|
||||
import Authentik from '@auth/core/providers/authentik';
|
||||
import MicrosoftEntraID from '@auth/core/providers/microsoft-entra-id';
|
||||
|
||||
export const { auth, signIn, signOut, store, isAuthenticated } = convexAuth({
|
||||
providers: [
|
||||
Password,
|
||||
Authentik,
|
||||
MicrosoftEntraID({
|
||||
clientId: process.env.AUTH_MICROSOFT_ENTRA_ID_ID!,
|
||||
clientSecret: process.env.AUTH_MICROSOFT_ENTRA_ID_SECRET!,
|
||||
// Either a tenant GUID, or "common" / "organizations" / "consumers"
|
||||
issuer: process.env.AUTH_MICROSOFT_ENTRA_ID_ISSUER!,
|
||||
// Optional, but providing an object prevents the undefined read:
|
||||
profilePhotoSize: 48,
|
||||
// Optional: request email + offline refresh
|
||||
authorization: {
|
||||
params: {
|
||||
scope: 'openid profile email offline_access',
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
@@ -53,7 +38,7 @@ export const getUser = query(async (ctx) => {
|
||||
name: user.name ?? null,
|
||||
image,
|
||||
lunchTime: user.lunchTime ?? null,
|
||||
automaticLunch: user.automaticLunch ?? (false as boolean),
|
||||
automaticLunch: user.automaticLunch ?? false,
|
||||
};
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user