disallow social login if account is deleted
This commit is contained in:
@ -15,6 +15,7 @@ import {
|
||||
suggestedUsername,
|
||||
} from './jwt_helpers'
|
||||
import { analytics } from '../../utils/analytics'
|
||||
import { StatusType } from '../../entity/user'
|
||||
|
||||
const appleBaseURL = 'https://appleid.apple.com'
|
||||
const audienceName = 'app.omnivore.app'
|
||||
@ -122,6 +123,7 @@ export async function handleAppleWebAuth(
|
||||
const user = await userRepository.findOneBy({
|
||||
sourceUserId: decodedTokenResult.sourceUserId,
|
||||
source: 'APPLE',
|
||||
status: StatusType.Active,
|
||||
})
|
||||
const userId = user?.id
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { google, oauth2_v2 as oauthV2 } from 'googleapis'
|
||||
import { OAuth2Client } from 'googleapis-common'
|
||||
import url from 'url'
|
||||
import { StatusType } from '../../entity/user'
|
||||
import { env, homePageURL } from '../../env'
|
||||
import { LoginErrorCode } from '../../generated/graphql'
|
||||
import { userRepository } from '../../repository/user'
|
||||
@ -130,6 +131,7 @@ export async function handleGoogleWebAuth(
|
||||
const user = await userRepository.findOneBy({
|
||||
email,
|
||||
source: 'GOOGLE',
|
||||
status: StatusType.Active,
|
||||
})
|
||||
const userId = user?.id
|
||||
|
||||
|
||||
Reference in New Issue
Block a user