Quirk with Rails 5.2 Encrypted Secrets and Slack Client IDs for OAuth

I’m building a Slack App on top of ZapCircle, so that you can leave status updates from Slack, and also publish them directly from Slack. Part of this is managing flow for OAuth, so you can add the ZapCircle app to your Slack team, and there is a connection.

OAuth requires a client ID and client secret - from Slack, my client id happened to be all numbers with a period in the middle. I didn’t happen to notice this when pasting it into the Rails 5.2 encrypted secrets file, which is YAML.

Unfortunately, YAML coerced that client ID into a float type, and then rounded off after the significant digit. That number didn’t match anything Slack had, so I had to debug it.

The simple fix was to wrap the Slack client ID in double quotes in my YAML file.

I don’t know if this is a common bug, but hopefully this saves you (or future me) a few minutes of debugging in the future!