How to setup heroku ENV variable for sso secret?

Yes, as far as setting ENV variables is concerned on Heroku it’s what you said earlier:

heroku config:set DISCOURSE_SECRET=ilovetomcruise

Once you do that, you’ll have the ENV set on your Heroku server.