function()

in packages/api/src/services/passport.ts [25:47]


			function (
				accessToken: string,
				refreshToken: string,
				// eslint-disable-next-line @typescript-eslint/no-explicit-any
				profile: any,
				done: VerifyCallback,
			) {
				// Need to cast to any since the type definitions for this library are broken. Great.
				// eslint-disable-next-line @typescript-eslint/no-explicit-any
				const profileAny = profile as any;
				if (
					profileAny._json.domain === 'guardian.co.uk' ||
					validateEmail(profileAny._json.email)
				) {
					done(null, profile);
				} else {
					done(
						new Error(
							'Your Google account is not authorised to use transcription-service. Contact prod.eng.investigations@guardian.co.uk for help',
						),
					);
				}
			},