# How to setup heroku ENV variable for sso secret?

**URL:** <https://meta.discourse.org/t/how-to-setup-heroku-env-variable-for-sso-secret/63155>\
**Category:** Product Support\
**Tags:** unsupported-install\
**Created:** [22.Май.2017 18:45:13 UTC](https://meta.discourse.org/t/how-to-setup-heroku-env-variable-for-sso-secret/63155 "2017-05-22T18:45:13Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![railsnoob](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@railsnoob](https://meta.discourse.org/u/railsnoob)\
**Post date:** [22.Май.2017 18:45:13 UTC](https://meta.discourse.org/t/how-to-setup-heroku-env-variable-for-sso-secret/63155/1 "2017-05-22T18:45:13Z")

</div>

right now my code looks like:

```plaintext
require 'single_sign_on'

class DiscourseSsoController < ApplicationController
  before_action :logged_in_user 
  def sso
    secret = "ilovetomcruise"
    sso = SingleSignOn.parse(request.query_string, secret)
    sso.email = current_user.email 
    sso.name = current_user.name # this is a custom method on the User class
    sso.username = current_user.name
    sso.external_id = current_user.id 
    @user_id = current_user.id
    sso.avatar_url = current_user.photo
    sso.sso_secret = secret
    sso.avatar_force_update = true

  end
end

```

How do I create an `ENV['something_here']` with heroku so I do not show the secret in my code? thanks.

---

_[View the full topic](https://meta.discourse.org/t/how-to-setup-heroku-env-variable-for-sso-secret/63155)._
