Skip to content

Commit

Permalink
fix module resolution error for checks import
Browse files Browse the repository at this point in the history
  • Loading branch information
erquhart committed Dec 14, 2024
1 parent aa539cf commit a49d0dd
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/server/oauth/callback.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
// This maps to packages/core/src/lib/actions/callback/oauth/callback.ts in the @auth/core package (commit 5af1f30a32e64591abc50ae4d2dba4682e525431)

import * as checks from "./checks";
import * as checks from "./checks.js";
import * as o from "oauth4webapi";
import { InternalOptions } from "./types.js";
import { fetchOpt } from "./lib/utils/customFetch.js";
import { Cookie } from "@auth/core/lib/utils/cookie.js";
import { logWithLevel } from "../implementation/utils.js";
import { Account, Profile, TokenSet } from "@auth/core/types.js";
import { isOIDCProvider } from "./lib/utils/providers.js";
import {
callbackUrl,
getAuthorizationSignature,
} from "./convexAuth.js";
import { callbackUrl, getAuthorizationSignature } from "./convexAuth.js";

function formUrlEncode(token: string) {
return encodeURIComponent(token).replace(/%20/g, "+");
Expand Down Expand Up @@ -44,10 +41,10 @@ export async function handleOAuth(
cookies: Record<string, string | undefined>,
options: InternalOptions<"oauth" | "oidc">,
): Promise<{
profile: Profile,
tokens: TokenSet & Pick<Account, "expires_at">,
cookies: Cookie[],
signature: string,
profile: Profile;
tokens: TokenSet & Pick<Account, "expires_at">;
cookies: Cookie[];
signature: string;
}> {
const { provider } = options;

Expand Down Expand Up @@ -183,12 +180,12 @@ export async function handleOAuth(
// It also only does so the first time the user consents to share their information.
if (provider.id === "apple") {
try {
profile.user = JSON.parse(params?.user)
profile.user = JSON.parse(params?.user);
// ConvexAuth: disabled lint for empty block
// eslint-disable-next-line no-empty
} catch {}
}
}

if (provider.idToken === false) {
const userinfoResponse = await o.userInfoRequest(
as,
Expand Down

0 comments on commit a49d0dd

Please sign in to comment.