File tree Expand file tree Collapse file tree 3 files changed +2
-14
lines changed
Expand file tree Collapse file tree 3 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -11,17 +11,6 @@ export type { User } from "@trigger.dev/database";
1111import { assertEmailAllowed } from "~/utils/email" ;
1212import { logger } from "~/services/logger.server" ;
1313
14- export class AuthConflictError extends Error {
15- constructor (
16- message : string ,
17- public readonly existingEmailUserId : string ,
18- public readonly existingAuthUserId : string
19- ) {
20- super ( message ) ;
21- this . name = "AuthConflictError" ;
22- }
23- }
24-
2514type FindOrCreateMagicLink = {
2615 authenticationMethod : "MAGIC_LINK" ;
2716 email : string ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export function addGitHubStrategy(
2020 async ( { extraParams, profile } ) => {
2121 const emails = profile . emails ;
2222
23- if ( ! emails ) {
23+ if ( ! emails ?. length ) {
2424 throw new Error ( "GitHub login requires an email address" ) ;
2525 }
2626
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export function addGoogleStrategy(
2020 async ( { extraParams, profile } ) => {
2121 const emails = profile . emails ;
2222
23- if ( ! emails ) {
23+ if ( ! emails ?. length ) {
2424 throw new Error ( "Google login requires an email address" ) ;
2525 }
2626
@@ -52,4 +52,3 @@ export function addGoogleStrategy(
5252
5353 authenticator . use ( googleStrategy ) ;
5454}
55-
You can’t perform that action at this time.
0 commit comments