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:
@@ -12,6 +12,9 @@ export async function createAuthIdentities(
|
||||
provider: "manual",
|
||||
},
|
||||
],
|
||||
app_metadata: {
|
||||
user_id: "user-1",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "test-id-1",
|
||||
|
||||
@@ -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",
|
||||
}),
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user