Skip to content
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

Hide QuizApi key #392

Open
Nodrex opened this issue May 18, 2023 · 1 comment
Open

Hide QuizApi key #392

Nodrex opened this issue May 18, 2023 · 1 comment
Assignees

Comments

@Nodrex
Copy link
Owner

Nodrex commented May 18, 2023

Remove QuizApi key from kotlin file and move to an environment not to be visible in commits

@Nodrex Nodrex self-assigned this May 18, 2023
@Nodrex
Copy link
Owner Author

Nodrex commented May 18, 2023

Create a .env file in the root directory of your project.
In the .env file, add the following line:

API_KEY=YOUR_API_KEY

When you are working locally, you can access your API key by using the following code:

String apiKey = System.getenv("API_KEY");

You can then use the API key in your Android code. For example, you can use it to make an API call.

Here is an example of how to use an API key to make an API call in Android:

service.getSomething(System.getenv("API_KEY"));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

1 participant