File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- const projectId = process . env . FIREBASE_PROJECT_ID ;
2- const clientEmail = process . env . FIREBASE_CLIENT_EMAIL ;
3- const privateKey = process . env . FIREBASE_PRIVATE_KEY ;
4-
5- if ( ! projectId || ! clientEmail || ! privateKey ) {
6- throw new Error ( "Missing Firebase credentials" ) ;
7- }
8-
91export const authConfig = {
102 apiKey : process . env . NEXT_PUBLIC_FIREBASE_API_KEY ! ,
113 cookieName : "__session" ,
@@ -20,8 +12,14 @@ export const authConfig = {
2012 maxAge : 60 * 60 * 24 * 14 , // 14 days
2113 } ,
2214 serviceAccount : {
23- projectId,
24- clientEmail,
25- privateKey : privateKey . replace ( / \\ n / g, "\n" ) ,
15+ get projectId ( ) {
16+ return process . env . FIREBASE_PROJECT_ID ! ;
17+ } ,
18+ get clientEmail ( ) {
19+ return process . env . FIREBASE_CLIENT_EMAIL ! ;
20+ } ,
21+ get privateKey ( ) {
22+ return process . env . FIREBASE_PRIVATE_KEY ! . replace ( / \\ n / g, "\n" ) ;
23+ } ,
2624 } ,
2725} ;
You can’t perform that action at this time.
0 commit comments