fix: add missing typings to create provider identity (#8677)

* fix: add missing typings to create provider identity

* add app_metadata to filterable fields for auth identity
This commit is contained in:
Christian
2024-08-21 07:29:31 +02:00
committed by GitHub
parent 8bd284779e
commit c999b414e7
4 changed files with 24 additions and 5 deletions

View File

@@ -12,6 +12,9 @@ export async function createAuthIdentities(
provider: "manual",
},
],
app_metadata: {
user_id: "user-1",
},
},
{
id: "test-id-1",

View File

@@ -67,6 +67,20 @@ moduleIntegrationTestRunner<IAuthModuleService>({
}),
])
})
it("should list authIdentities by meta data", async () => {
const authIdentities = await service.listAuthIdentities({
app_metadata: {
user_id: "user-1",
},
})
expect(authIdentities).toEqual([
expect.objectContaining({
id: "test-id",
}),
])
})
})
describe("listAndCountAuthIdentities", () => {
@@ -226,7 +240,9 @@ moduleIntegrationTestRunner<IAuthModuleService>({
const [authIdentity] = await service.listAuthIdentities({ id: [id] })
expect(authIdentity).toEqual(
expect.objectContaining({
app_metadata: { email: "test@email.com" },
app_metadata: expect.objectContaining({
email: "test@email.com",
}),
})
)
})