From 6e46cf67cb963d597209ab7b7b8049ad47e9415a Mon Sep 17 00:00:00 2001 From: Pranjal maurya Date: Sun, 2 Oct 2022 06:59:12 +0530 Subject: [PATCH 1/6] moved credentials from firebase.js to .env --- src/utility/firebase.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/utility/firebase.js b/src/utility/firebase.js index 7f560fb..08f6a14 100644 --- a/src/utility/firebase.js +++ b/src/utility/firebase.js @@ -8,13 +8,13 @@ import { getAnalytics } from 'firebase/analytics'; // Your web app's Firebase configuration // For Firebase JS SDK v7.20.0 and later, measurementId is optional const firebaseConfig = { - apiKey: 'AIzaSyDs-rxvOLmskYhudQWPOxl-whELlKKUYhs', - authDomain: 'issue-finder.firebaseapp.com', - projectId: 'issue-finder', - storageBucket: 'issue-finder.appspot.com', - messagingSenderId: '918268898722', - appId: '1:918268898722:web:653b04454a9eee41d896fb', - measurementId: 'G-C28740E7D5' + apiKey:process.env.REACT_APP_API_KEY, + authDomain: process.env.REACT_APP_AUTHDOMAIN, + projectId: process.env.REACT_APP_PROJECTID, + storageBucket:process.env.REACT_APP_STORAGEBUCKET, + messagingSenderId:process.env.REACT_APP_MSG_SENDERID, + appId: process.env.REACT_APP_APPID, + measurementId: process.env.REACT_APP_MEASUREMENTID }; // Initialize Firebase From a856a16d83d8874f0c5a26ee7d6e795d3117de36 Mon Sep 17 00:00:00 2001 From: Pranjal maurya Date: Sun, 2 Oct 2022 07:01:14 +0530 Subject: [PATCH 2/6] removed .env from gitignore --- .env | 8 ++++++++ .gitignore | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..9b76b07 --- /dev/null +++ b/.env @@ -0,0 +1,8 @@ +REACT_APP_API_KEY='AIzaSyDs-rxvOLmskYhudQWPOxl-whELlKKUYhs', +REACT_APP_AUTHDOMAIN="issue-finder.firebaseapp.com", +REACT_APP_PROJECTID='issue-finder', +REACT_APP_STORAGEBUCKET='issue-finder.appspot.com', +REACT_APP_MSG_SENDERID='918268898722', +REACT_APP_APPID='1:918268898722:web:653b04454a9eee41d896fb', +REACT_APP_MEASUREMENTID='G-C28740E7D5' + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2a29c9b..46c9f5e 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,7 @@ typings/ .yarn-integrity # dotenv environment variables file -.env + .env.test # parcel-bundler cache (https://parceljs.org/) From 050b5b3faeaac1f5706632d88e4baf510360add1 Mon Sep 17 00:00:00 2001 From: Pranjal maurya Date: Sun, 2 Oct 2022 22:27:12 +0530 Subject: [PATCH 3/6] moved env variables to env.sample --- .env.sample | 10 +++++++++- .gitignore | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.env.sample b/.env.sample index 6fcd6da..8f328b0 100644 --- a/.env.sample +++ b/.env.sample @@ -1 +1,9 @@ -REACT_APP_API_KEY=gh_xxxxxxxx... \ No newline at end of file + +REACT_APP_API_KEY='AIzaSyDs-rxvOLmskYhudQWPOxl-whELlKKUYhs', +REACT_APP_AUTHDOMAIN="issue-finder.firebaseapp.com", +REACT_APP_PROJECTID='issue-finder', +REACT_APP_STORAGEBUCKET='issue-finder.appspot.com', +REACT_APP_MSG_SENDERID='918268898722', +REACT_APP_APPID='1:918268898722:web:653b04454a9eee41d896fb', +REACT_APP_MEASUREMENTID='G-C28740E7D5' + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 46c9f5e..2a29c9b 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,7 @@ typings/ .yarn-integrity # dotenv environment variables file - +.env .env.test # parcel-bundler cache (https://parceljs.org/) From 18e274f4ec6bb2f4a207b0511223c1b3937ce0dc Mon Sep 17 00:00:00 2001 From: Pranjal Maurya <79030501+0xPranjl@users.noreply.github.com> Date: Mon, 3 Oct 2022 07:10:50 +0530 Subject: [PATCH 4/6] deleted .env --- .env | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index 9b76b07..0000000 --- a/.env +++ /dev/null @@ -1,8 +0,0 @@ -REACT_APP_API_KEY='AIzaSyDs-rxvOLmskYhudQWPOxl-whELlKKUYhs', -REACT_APP_AUTHDOMAIN="issue-finder.firebaseapp.com", -REACT_APP_PROJECTID='issue-finder', -REACT_APP_STORAGEBUCKET='issue-finder.appspot.com', -REACT_APP_MSG_SENDERID='918268898722', -REACT_APP_APPID='1:918268898722:web:653b04454a9eee41d896fb', -REACT_APP_MEASUREMENTID='G-C28740E7D5' - \ No newline at end of file From 28031477e94f2bcab2959ec0011792a06bb9797b Mon Sep 17 00:00:00 2001 From: Pranjal Maurya <79030501+0xPranjl@users.noreply.github.com> Date: Mon, 3 Oct 2022 07:15:57 +0530 Subject: [PATCH 5/6] Update .env.sample --- .env.sample | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.sample b/.env.sample index 8f328b0..c87fa56 100644 --- a/.env.sample +++ b/.env.sample @@ -1,9 +1,9 @@ - -REACT_APP_API_KEY='AIzaSyDs-rxvOLmskYhudQWPOxl-whELlKKUYhs', +REACT_APP_API_KEY=gh_xxxxxxxx..., +REACT_APP_FIRBASE_API_KEY='AIzaSyDs-rxvOLmskYhudQWPOxl-whELlKKUYhs', REACT_APP_AUTHDOMAIN="issue-finder.firebaseapp.com", REACT_APP_PROJECTID='issue-finder', REACT_APP_STORAGEBUCKET='issue-finder.appspot.com', REACT_APP_MSG_SENDERID='918268898722', REACT_APP_APPID='1:918268898722:web:653b04454a9eee41d896fb', REACT_APP_MEASUREMENTID='G-C28740E7D5' - \ No newline at end of file + From dc6001d56f08e3d6324bddf07c4eebe3d00c4af9 Mon Sep 17 00:00:00 2001 From: Pranjal Maurya <79030501+0xPranjl@users.noreply.github.com> Date: Mon, 3 Oct 2022 07:17:23 +0530 Subject: [PATCH 6/6] Update firebase.js --- src/utility/firebase.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/firebase.js b/src/utility/firebase.js index 08f6a14..1a9a4ad 100644 --- a/src/utility/firebase.js +++ b/src/utility/firebase.js @@ -8,7 +8,7 @@ import { getAnalytics } from 'firebase/analytics'; // Your web app's Firebase configuration // For Firebase JS SDK v7.20.0 and later, measurementId is optional const firebaseConfig = { - apiKey:process.env.REACT_APP_API_KEY, + apiKey:process.env.REACT_APP_FIRBASE_API_KEY, authDomain: process.env.REACT_APP_AUTHDOMAIN, projectId: process.env.REACT_APP_PROJECTID, storageBucket:process.env.REACT_APP_STORAGEBUCKET,