Skip to content

Replace secrets with credentials so /admin is accessible#672

Open
rianrainey wants to merge 1 commit intonodunayo:masterfrom
rianrainey:feature/use-credentials-instead-of-secrets
Open

Replace secrets with credentials so /admin is accessible#672
rianrainey wants to merge 1 commit intonodunayo:masterfrom
rianrainey:feature/use-credentials-instead-of-secrets

Conversation

@rianrainey
Copy link

What does this PR do?

Replace Rails secrets with Rails credentials.

Why was this work done? Is there a related Issue?

Fixes #671

Where should a reviewer start?

Try to spin up the app fresh on the main branch and visit /admin. You should get the error screenshot attached below. In Rails 7.2, secrets functionality was dropped. This PR brings the app up to date with Rails 8 best practices, removes dependency on dotenv-rails, and secrets file.

For more info: https://guides.rubyonrails.org/security.html#custom-credentials

Are there any manual testing steps?

I think this PR still needs a Production credential file to be created. You can use development or test as a guide. I didn't know those creds so I'll leave that to you.


Screenshots

Before
Screenshot 2025-07-09 at 10 13 09 PM
After
Screenshot 2025-07-09 at 10 13 42 PM

Deployment instructions

Database changes

New ENV variables

/coverage/*

/config/credentials/development.key
/config/credentials/test.key
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add production.key here when that's ready.

@nodunayo
Copy link
Owner

nodunayo commented Jul 21, 2025

Okay, great. Thank you! Will take a look soon!

@nodunayo
Copy link
Owner

Hi @rianrainey!

Turns out we've started this work as part of #586 so I'll likely just continue it from there and close this issue.

Thank you for you work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rails 8 needs to use credentials instead of secrets for env variables

2 participants