trying to fix env variables for nextjs
This commit is contained in:
parent
5c94b44c5d
commit
d8abd090ed
@ -1,4 +1,9 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {};
|
const nextConfig = {
|
||||||
|
serverRuntimeConfig: {
|
||||||
|
OAUTH_CLIENT_ID: process.env.OAUTH_CLIENT_ID,
|
||||||
|
OAUTH_CLIENT_SECRET: process.env.OAUTH_CLIENT_SECRET,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { GitHub } from "arctic";
|
import { GitHub } from "arctic";
|
||||||
|
import getConfig from "next/config";
|
||||||
|
|
||||||
export const github = new GitHub(process.env.OAUTH_CLIENT_ID as string, process.env.OAUTH_CLIENT_SECRET as string, {
|
const { serverRuntimeConfig } = getConfig();
|
||||||
|
export const github = new GitHub(serverRuntimeConfig.OAUTH_CLIENT_ID, serverRuntimeConfig.OAUTH_CLIENT_SECRET, {
|
||||||
enterpriseDomain: "https://git.i.mercedes-benz.com",
|
enterpriseDomain: "https://git.i.mercedes-benz.com",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user