mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
disallow social login if account is deleted
This commit is contained in:
parent
6e79f6c67f
commit
700fd73dbb
2 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue