Qfix GitHub auth (#9239)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev
2025-06-15 21:17:27 +07:00
committed by GitHub
parent 57d092a365
commit d34cd599a3
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ export async function handleProviderAuth (
providerType: string,
rawState: string | undefined,
user: any,
email: string,
email: string | undefined,
first: string,
last: string,
socialKey: SocialKey,
+5 -5
View File
@@ -1170,14 +1170,14 @@ export async function loginOrSignUpWithProvider (
ctx: MeasureContext,
db: AccountDB,
branding: Branding | null,
email: string,
email: string | undefined,
first: string,
last: string,
socialId: SocialKey,
signUpDisabled = false
): Promise<LoginInfo | null> {
try {
const normalizedEmail = cleanEmail(email)
const normalizedEmail = email != null ? cleanEmail(email) : ''
// Find if any of the target/email social ids exist
const targetSocialId = await db.socialId.findOne(socialId)
@@ -1248,7 +1248,7 @@ export async function loginOrSignUpWithProvider (
await confirmHulyIds(ctx, db, personUuid as AccountUuid)
const extraToken: Record<string, string> = isAdminEmail(normalizedEmail) ? { admin: 'true' } : {}
ctx.info('Provider login succeeded', { email, normalizedEmail, emailSocialId, ...extraToken })
ctx.info('Provider login succeeded', { email, normalizedEmail, emailSocialId, socialId, ...extraToken })
return {
account: personUuid as AccountUuid,
@@ -1267,14 +1267,14 @@ export async function joinWithProvider (
ctx: MeasureContext,
db: AccountDB,
branding: Branding | null,
email: string,
email: string | undefined,
first: string,
last: string,
inviteId: string,
socialId: SocialKey,
signUpDisabled = false
): Promise<WorkspaceLoginInfo | LoginInfo | null> {
const normalizedEmail = cleanEmail(email)
const normalizedEmail = email != null ? cleanEmail(email) : ''
const invite = await getWorkspaceInvite(db, inviteId)
if (invite == null) {
throw new PlatformError(new Status(Severity.ERROR, platform.status.Forbidden, {}))