Revamp auth module to support multiple providers linked to a single auth identity (#7521)

This commit is contained in:
Stevche Radevski
2024-06-05 07:47:16 +00:00
committed by GitHub
parent 20cd6a7b51
commit fafc92b875
23 changed files with 640 additions and 216 deletions
@@ -158,8 +158,12 @@ describe("Google auth provider", () => {
}),
create: jest.fn().mockImplementation(() => {
return {
entity_id: "test@admin.com",
provider: "google",
provider_identities: [
{
entity_id: "test@admin.com",
provider: "google",
},
],
}
}),
}
@@ -177,8 +181,12 @@ describe("Google auth provider", () => {
success: true,
successRedirectUrl: baseUrl,
authIdentity: {
entity_id: "test@admin.com",
provider: "google",
provider_identities: [
{
entity_id: "test@admin.com",
provider: "google",
},
],
},
})
})
@@ -187,8 +195,12 @@ describe("Google auth provider", () => {
const authServiceSpies = {
retrieve: jest.fn().mockImplementation(() => {
return {
entity_id: "test@admin.com",
provider: "google",
provider_identities: [
{
entity_id: "test@admin.com",
provider: "google",
},
],
}
}),
create: jest.fn().mockImplementation(() => {
@@ -209,8 +221,12 @@ describe("Google auth provider", () => {
success: true,
successRedirectUrl: baseUrl,
authIdentity: {
entity_id: "test@admin.com",
provider: "google",
provider_identities: [
{
entity_id: "test@admin.com",
provider: "google",
},
],
},
})
})