Skip to content

Commit ebbbc9e

Browse files
authored
Merge pull request #18798 from mozilla/FXA-11209
fix(gql-api): remove GqlCustomsGuard from select resolvers
2 parents 2720b1a + 96ca041 commit ebbbc9e

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

packages/fxa-graphql-api/src/gql/account.resolver.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export class AccountResolver {
167167
description:
168168
'Create a new randomly generated TOTP token for a user if they do not currently have one.',
169169
})
170-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
170+
@UseGuards(GqlAuthGuard)
171171
public async createTotp(
172172
@GqlSessionToken() token: string,
173173
@GqlXHeaders() headers: Headers,
@@ -191,7 +191,7 @@ export class AccountResolver {
191191
description:
192192
'Verifies the current session if the passed TOTP code is valid.',
193193
})
194-
@UseGuards(UnverifiedSessionGuard, GqlCustomsGuard)
194+
@UseGuards(UnverifiedSessionGuard)
195195
@CatchGatewayError
196196
public async verifyTotp(
197197
@GqlSessionToken() token: string,
@@ -214,7 +214,7 @@ export class AccountResolver {
214214
@Mutation((returns) => BasicPayload, {
215215
description: 'Deletes the current TOTP token for the user.',
216216
})
217-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
217+
@UseGuards(GqlAuthGuard)
218218
@CatchGatewayError
219219
public async deleteTotp(
220220
@GqlSessionToken() token: string,
@@ -231,7 +231,7 @@ export class AccountResolver {
231231
@Mutation((returns) => BasicPayload, {
232232
description: 'Deletes the current recovery key for the user.',
233233
})
234-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
234+
@UseGuards(GqlAuthGuard)
235235
@CatchGatewayError
236236
public async deleteRecoveryKey(
237237
@GqlSessionToken() token: string,
@@ -249,7 +249,7 @@ export class AccountResolver {
249249
description:
250250
'Return new backup authentication codes while removing old ones.',
251251
})
252-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
252+
@UseGuards(GqlAuthGuard)
253253
@CatchGatewayError
254254
public async changeRecoveryCodes(
255255
@GqlSessionToken() token: string,
@@ -326,7 +326,7 @@ export class AccountResolver {
326326
@Mutation((returns) => BasicPayload, {
327327
description: 'Create a secondary email for the signed in account.',
328328
})
329-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
329+
@UseGuards(GqlAuthGuard)
330330
@CatchGatewayError
331331
public async createSecondaryEmail(
332332
@GqlSessionToken() token: string,
@@ -347,7 +347,7 @@ export class AccountResolver {
347347
@Mutation((returns) => BasicPayload, {
348348
description: 'Reset the verification code to a secondary email.',
349349
})
350-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
350+
@UseGuards(GqlAuthGuard)
351351
@CatchGatewayError
352352
public async resendSecondaryEmailCode(
353353
@GqlSessionToken() token: string,
@@ -365,7 +365,7 @@ export class AccountResolver {
365365
@Mutation((returns) => BasicPayload, {
366366
description: 'Verify the email address with a code.',
367367
})
368-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
368+
@UseGuards(GqlAuthGuard)
369369
@CatchGatewayError
370370
public async verifySecondaryEmail(
371371
@GqlSessionToken() token: string,
@@ -384,7 +384,7 @@ export class AccountResolver {
384384
@Mutation((returns) => BasicPayload, {
385385
description: 'Remove the secondary email for the signed in account.',
386386
})
387-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
387+
@UseGuards(GqlAuthGuard)
388388
@CatchGatewayError
389389
public async deleteSecondaryEmail(
390390
@GqlSessionToken() token: string,
@@ -399,7 +399,7 @@ export class AccountResolver {
399399
description:
400400
'Change users primary email address, this email address must belong to the user and be verified.',
401401
})
402-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
402+
@UseGuards(GqlAuthGuard)
403403
@CatchGatewayError
404404
public async updatePrimaryEmail(
405405
@GqlSessionToken() token: string,
@@ -433,7 +433,7 @@ export class AccountResolver {
433433
@Mutation((returns) => BasicPayload, {
434434
description: 'Send a session verification email.',
435435
})
436-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
436+
@UseGuards(GqlAuthGuard)
437437
@CatchGatewayError
438438
public async sendSessionVerificationCode(
439439
@GqlSessionToken() token: string,
@@ -448,7 +448,7 @@ export class AccountResolver {
448448
@Mutation((returns) => BasicPayload, {
449449
description: 'Verify the session via an email code.',
450450
})
451-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
451+
@UseGuards(GqlAuthGuard)
452452
@CatchGatewayError
453453
public async verifySession(
454454
@GqlSessionToken() token: string,

packages/fxa-graphql-api/src/gql/session.resolver.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class SessionResolver {
3939
@Mutation((returns) => BasicPayload, {
4040
description: 'Logs out the current session',
4141
})
42-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
42+
@UseGuards(GqlAuthGuard)
4343
public async destroySession(
4444
@GqlSessionToken() token: string,
4545
@GqlXHeaders() headers: Headers,
@@ -106,7 +106,7 @@ export class SessionResolver {
106106
@Mutation((returns) => BasicPayload, {
107107
description: 'Resend a verify code.',
108108
})
109-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
109+
@UseGuards(GqlAuthGuard)
110110
@CatchGatewayError
111111
public async resendVerifyCode(
112112
@GqlSessionToken() token: string,
@@ -122,7 +122,7 @@ export class SessionResolver {
122122
@Mutation((returns) => BasicPayload, {
123123
description: 'Verify a OTP code.',
124124
})
125-
@UseGuards(GqlAuthGuard, GqlCustomsGuard)
125+
@UseGuards(GqlAuthGuard)
126126
@CatchGatewayError
127127
public async verifyCode(
128128
@GqlSessionToken() token: string,
@@ -145,7 +145,7 @@ export class SessionResolver {
145145
description:
146146
'Verify session with a 2FA backup authentication (recovery) code',
147147
})
148-
@UseGuards(UnverifiedSessionGuard, GqlCustomsGuard)
148+
@UseGuards(UnverifiedSessionGuard)
149149
@CatchGatewayError
150150
public async consumeRecoveryCode(
151151
@GqlSessionToken() token: string,

0 commit comments

Comments
 (0)