Skip to content

Privacy

José De Freitas edited this page Oct 5, 2021 · 9 revisions

Your credentials

The driver is a program that navigates to the Codewars website and fills the required fields with your data to be able to get all the katas. However, you probably wondered: “Why don't just using the API to access the katas I've completed without the necessity of using a driver?” Well, the thing is that the completed challenges can only be seen by the person who has already completed the challenges, in order to force yourself to complete the kata and to not copy and paste the code of others. Because of this, you need to # to your Codewars account to be able to read the katas. The driver does this automatically, but of course it needs your credentials. These are not stored anywhere, because it simply acts as if you were signing in.

When you pass your Codewars username and GitHub username and password as arguments in the dotnet run command, the program reads the values just one time (when you run the command), so they're not stored. If you want to store them to avoid having to pass these values every time, you can add them to a file (often called .env) and read the data in the Program.cs file. In this case, the values are stored as environment variables. You can encrypt these values if you want. One really important thing is that you must ignore (in the .gitignore file) the file that you create to store this information. If you don't, Git will see the values, and they will be shown in your private GitHub repository.

If, for some reason, you accidentally committed and/or pushed the files containing your information, I recommend you just delete the repository. This won't represent a security issue because your repository is private, but remember that GitHub keeps track of all the changes (history). Don't worry, because you just need to create a new repository from this repository template and clone everything again.

Codewars and GitHub

At the moment, Codewars doesn't provide an access token (although they include one in the configuration page of your account) to access the API. This is why such an “obnoxious” process must be made to access the website content. The version of the Codewars API is 1. If they launch a new version with this implementation, another method could be used, reducing the code and being able to make a full refactor of the program.

Remember that, as said in the README.md file, you must have registered in Codewars using the GitHub OAuth option. If you didn't, you can just delete the references to the GitHub username and password values and use the Codewars username and password instead. You can see an example of this in the subsection “Use Codewars credentials instead of GitHub's”.

If you use GitHub credentials, you will see one session per run in the “Account security” section. There's no way of avoiding this, but you can delete these logs one by one by clicking in the “See more” button and then in the “Revoke session” red button (be careful not to revoke the session you're currently in. You can notice this because it will have a green circle next to it, and it will say “Your current session”). GitHub creates a new session every time you run the program (if you're accessing through the GitHub OAuth option). It ends after some time. Ended sessions will be shown up with a grey circle next to them.

Clone this wiki locally