fix: Use sub instead of email for google entity ID (#9949)
This commit is contained in:
@@ -155,7 +155,7 @@ describe("Google auth provider", () => {
|
||||
return {
|
||||
provider_identities: [
|
||||
{
|
||||
entity_id: "test@admin.com",
|
||||
entity_id: "113664482950786663866",
|
||||
provider: "google",
|
||||
},
|
||||
],
|
||||
@@ -180,7 +180,7 @@ describe("Google auth provider", () => {
|
||||
authIdentity: {
|
||||
provider_identities: [
|
||||
{
|
||||
entity_id: "test@admin.com",
|
||||
entity_id: "113664482950786663866",
|
||||
provider: "google",
|
||||
},
|
||||
],
|
||||
@@ -194,7 +194,7 @@ describe("Google auth provider", () => {
|
||||
return {
|
||||
provider_identities: [
|
||||
{
|
||||
entity_id: "test@admin.com",
|
||||
entity_id: "113664482950786663866",
|
||||
provider: "google",
|
||||
},
|
||||
],
|
||||
@@ -222,7 +222,7 @@ describe("Google auth provider", () => {
|
||||
authIdentity: {
|
||||
provider_identities: [
|
||||
{
|
||||
entity_id: "test@admin.com",
|
||||
entity_id: "113664482950786663866",
|
||||
provider: "google",
|
||||
},
|
||||
],
|
||||
|
||||
@@ -142,8 +142,7 @@ export class GoogleAuthService extends AbstractAuthModuleProvider {
|
||||
)
|
||||
}
|
||||
|
||||
// TODO: We should probably use something else than email here, like the `sub` field (which is more constant than the email)
|
||||
const entity_id = payload.email
|
||||
const entity_id = payload.sub
|
||||
const userMetadata = {
|
||||
name: payload.name,
|
||||
picture: payload.picture,
|
||||
|
||||
Reference in New Issue
Block a user