Skip to content

Commit

Permalink
Fix various lint violations and order imports
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttrinh committed Nov 10, 2023
1 parent f3303a8 commit 139c523
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions packages/auth-nextjs/src/app/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { Client } from "edgedb";
import { Auth, builtinOAuthProviderNames, TokenData } from "@edgedb/auth-core";
import { NextAuth, NextAuthOptions, NextAuthSession } from "../shared";

import {
Auth,
builtinOAuthProviderNames,
type BuiltinOAuthProviderNames,
type TokenData,
} from "@edgedb/auth-core";
import type { Client } from "edgedb";
import { cookies } from "next/headers";
import { redirect } from "next/navigation";
import { NextRequest } from "next/server";
import type { NextRequest } from "next/server";

import { NextAuth, NextAuthSession, type NextAuthOptions } from "../shared";

export { type NextAuthOptions, NextAuthSession };
export { NextAuthSession, type NextAuthOptions };

type ParamsOrError<Result extends object> =
| ({ error: null } & Result)
Expand Down Expand Up @@ -66,7 +71,7 @@ export class NextAppAuth extends NextAuth {
}
const provider = req.nextUrl.searchParams.get(
"provider_name"
) as any;
) as BuiltinOAuthProviderNames | null;
if (!provider || !builtinOAuthProviderNames.includes(provider)) {
throw new Error(`invalid provider_name: ${provider}`);
}
Expand Down Expand Up @@ -521,7 +526,7 @@ function _getReqBody(req: NextRequest) {
}

function _extractParams(
data: FormData | any,
data: FormData | Record<string, unknown>,
paramNames: string[],
errMessage: string
) {
Expand Down

0 comments on commit 139c523

Please sign in to comment.