Skip to content

Commit

Permalink
chore: fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
dipendraupreti committed May 24, 2024
1 parent 8bd87a0 commit a4275e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,15 @@ const createNewSession = (
} as FastifyError;
}

input.userContext.user = user;

const userProfileBuild = await new profileVerificationClaim(
fastify,
request
).build(input.userId, input.userContext);

input.accessTokenPayload = {
...input.accessTokenPayload,
...userProfileBuild,
};

const originalResponse = await originalImplementation.createNewSession(
input
);

await originalResponse.fetchAndSetClaim(
new profileVerificationClaim(fastify, request),
true
);

return originalResponse;
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ const getGlobalClaimValidators = (
throw new Error("Should never come here");
}

console.log("getGlobalClaimValidators input", input);

const profileVerificationValidator = new ProfileVerificationClaim(
fastify,
input.userContext._default.request.request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BooleanClaim } from "supertokens-node/lib/build/recipe/session/claims";
import type { FastifyInstance, FastifyRequest } from "fastify";

class ProfileVerificationClaim extends BooleanClaim {
static key: string;
static key = "pv";

constructor(fastify: FastifyInstance, request: FastifyRequest) {
super({
Expand Down

0 comments on commit a4275e9

Please sign in to comment.