Skip to content

Commit

Permalink
Merge branch 'main' into renovate/expo-router-2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge authored Nov 8, 2023
2 parents 1f40c7b + 2974710 commit 3602f76
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions apps/auth-proxy/routes/api/[...auth].ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import type { AuthConfig } from "@auth/core";
import { Auth } from "@auth/core";
import Discord from "@auth/core/providers/discord";
import { eventHandler, toWebRequest } from "h3";

export default eventHandler(async (event) => {
const config = {
export default eventHandler(async (event) =>
Auth(toWebRequest(event), {
secret: process.env.AUTH_SECRET,
trustHost: !!process.env.VERCEL,
redirectProxyUrl: process.env.AUTH_REDIRECT_PROXY_URL,
Expand All @@ -14,7 +13,5 @@ export default eventHandler(async (event) => {
clientSecret: process.env.AUTH_DISCORD_SECRET,
}),
],
} satisfies AuthConfig;

return Auth(toWebRequest(event), config);
});
}),
);

0 comments on commit 3602f76

Please sign in to comment.