-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[refactor] implement dotenv to hide api-keys from codebase #277
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just tell them to add the firebase_options.dart file instead of loading it from env file ?
docs/GETTING_STARTED.md
Outdated
|
||
- Duplicate `env/.env.sample` and rename as `.env` | ||
- Create a Firebase project [here](https://console.firebase.google.com/) | ||
- Set up firebase app as mentioned [here]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add link here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated, along with non null checks for optional parameters on firebase_options.dart
.
As of now, API keys of the production server are exposed, which might have been unintended. This could lead to exploitation of resources and incur unexpected costs. That is why we prefer .env while initialisation of any project. Secondly, But then, later when we're to run automation to publish releases straight to the respective platform, or run checks on PR and commits, removing this file from the codebase would raise issues. |
Hey @opxdelwin Thanks a lot for your contribution 🚀✨, having a .env is always considered as on of the best practices for any repository. But currenlty we planning to have a .bat script that creates an appwrite env similar to our main env on the contibutors local machine using appwrite self hosted (docker). Thus we wont have to expose our env variables anymore rather more control would be in the contributors hands. We really appreciate your work towards Resonate. There are a lot of issues and things to be done in the app. Lets move forward and build Resonate a beautiful app. Thank you |
Description
This PR will add a
.env
file to securely store these credentials. The code now retrieves them from the environment variable, keeping them hidden within the development environment.Here's what this means:
Fixes #273
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
I haven't added unit tests as these are code refactors, moreover it doesn't look like tests have been initialized beforehand.
I'll be happy to add if required.
Checklist:
Maintainer Checklist