mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
fixed oauth provider type bug
This commit is contained in:
parent
eeb9e2a4ae
commit
13d0743d45
@ -23,7 +23,9 @@ export const usersCrudHandlers = createPrismaCrudHandlers(usersCrud, "projectUse
|
||||
},
|
||||
};
|
||||
},
|
||||
include: async () => ({}),
|
||||
include: async () => ({
|
||||
projectUserOAuthAccounts: true,
|
||||
}),
|
||||
createNotFoundError: () => new KnownErrors.UserNotFound(),
|
||||
crudToPrisma: async (crud, { auth }) => {
|
||||
const projectId = auth.project.id;
|
||||
@ -49,7 +51,7 @@ export const usersCrudHandlers = createPrismaCrudHandlers(usersCrud, "projectUse
|
||||
authMethod: prisma.passwordHash ? 'credential' as const : 'oauth' as const, // not used anymore, for backwards compatibility
|
||||
hasPassword: !!prisma.passwordHash,
|
||||
authWithEmail: prisma.authWithEmail,
|
||||
oauthProviders: auth.project.evaluatedConfig.oauthProviders.map((provider) => provider.id),
|
||||
oauthProviders: prisma.projectUserOAuthAccounts.map((a) => a.oauthProviderConfigId),
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user