You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Rake task for inserting pre-generated access token into database
This task allows inserting a token into the access tokens table without
already having an API token.
To use this, generate a UUID or other random string, and then pass the
hex encoded sha256 digest of that to the `insert` task:
```bash
TOKEN="$(ruby -e "require 'securerandom'; puts SecureRandom.uuid")"
TOKEN_DIGEST="$(ruby -e "require 'digest'; puts Digest::SHA256.hexdigest('$TOKEN')")"
bin/rails access_tokens:insert[$TOKEN_DIGEST]
```
Then don't forget to save the token somewhere safe!
0 commit comments