Encrypted Credentials
Open the credentials file
rails credentials:edit
Format for the credentials file
production:
slack:
app_id: APPID
client_id: CLIENT_ID
client_secret: CLIENT_SECRET
verification_token: VERIFICATION_TOKEN
signing_secret: SIGNING_SECRET
development:
slack:
app_id: APPID
client_id: CLIENT_ID
client_secret: CLIENT_SECRET
verification_token: VERIFICATION_TOKEN
signing_secret: SIGNING_SECRET
sendgrid_api_key: SENDGRID_API_KEY
# Used as the base secret for all MessageVerifiers in Rails, including the one protecting cookies.
secret_key_base: AUTOGENERATED CODE
Calling the Credentials
Rails.application.credentials[Rails.env.to_sym][:slack][:signing_secret]
Rails.application.credentials[:supa][:apikey]