Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
walnuts1018 committed Oct 31, 2023
1 parent 0b43bc9 commit cdaeaa6
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions front/src/app/api/auth/[...nextauth]/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,16 @@ import { JWT } from "next-auth/jwt";
import ZitadelProvider from "next-auth/providers/zitadel";
import { custom } from "openid-client";

const client_id = process.env.ZITADEL_CLIENT_ID;
const client_secret = process.env.ZITADEL_CLIENT_SECRET;
const zitadel_url = process.env.ZITADEL_URL;

if (!client_id || !client_secret) {
throw new Error("ZITADEL_CLIENT_ID and ZITADEL_CLIENT_SECRET must be set");
}

custom.setHttpOptionsDefaults({
timeout: 10000,
});

const authOptions = {
providers: [
ZitadelProvider({
clientId: client_id,
clientSecret: client_secret,
issuer: zitadel_url,
clientId: process.env.ZITADEL_CLIENT_ID as string,
clientSecret: process.env.ZITADEL_CLIENT_SECRET as string,
issuer: process.env.ZITADEL_URL,
}),
],
callbacks: {
Expand Down

0 comments on commit cdaeaa6

Please sign in to comment.