-
Notifications
You must be signed in to change notification settings - Fork 1
Frontend
AOrps edited this page Apr 26, 2022
·
7 revisions
src/front-end
- Google oauth2 credentials { CLIENT_ID + CLIENT_SECRET }
-
.env
file -
valid-sigs.json
file
# To create .env file
touch .env
-
.env
must have the following5
environment variables-
GOOGLE_CLIENT_ID
- This is provided to the developer via Google.
-
GOOGLE_CLIENT_SECRET
- This is provided to the developer via Google.
-
SESSION_KEY
- For the developer to choose. (At the time of writing this it is some random characters but there is definitely a better (and more secure) way of doing this and may be omitted in the future)
-
BENDPOINT
- This should be the endpoint (server, area, etc.) where the
src/api
portion of the code is being run
- This should be the endpoint (server, area, etc.) where the
-
TYPE
- Helps maintainers / testers
- Option between
"test"
or"prod"
-
"test"
: tests onlocalhost/oauth2/callback
i.e. for testing -
"prod"
: tests onsig-track.xyz/oauth2/callback
endpoint i.e. for production
-
- Default is "test" functionality
-
# Change to src/front-end directory
cd src/front-end
# .env file
cat <<EOF > .env
GOOGLE_CLIENT_ID=""
GOOGLE_CLIENT_SECRET=""
SESSION_KEY=""
BENDPOINT=""
TYPE=""
EOF
# valid-sigs.json file
cat <<EOF > valid-sigs.json
[ "sig1", "sig2", "sig3", ... ]
EOF