Replace simple token authentication gem with an encrypted API token field #1329
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's bothered me for a while that the tokens were plaintext in the database. This change will reset everyone's tokens, but that shouldn't be a huge problem since there aren't many people using the API right now anyway.
I still need to get all the tests working and probably write a few more. For some reason the app doesn't accept the token in the current spec I've written.
CI will need to get some fake values for the credentials files. (can maybe use the multi-environment credentials functionality? https://blog.saeloun.com/2019/10/10/rails-6-adds-support-for-multi-environment-credentials.html)
It makes it so the GraphiQL interface has the headers editor enabled and will be autofilled with fake data. The user session shouldn't be valid as authentication for accessing the GraphQL API.