# StateParameters (Ruby on Rails application) omniauth auth0

**URL:** <https://community.auth0.com/t/stateparameters-ruby-on-rails-application-omniauth-auth0/113348>\
**Category:** Get Help\
**Tags:** other, missing-category\
**Created:** [August 10, 2023, 12:16pm UTC](https://community.auth0.com/t/stateparameters-ruby-on-rails-application-omniauth-auth0/113348 "2023-08-10T12:16:48Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![csuntay](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/csuntay/32/49779_2.png) [@csuntay](https://community.auth0.com/u/csuntay)\
**Post date:** [August 10, 2023, 2:29pm UTC](https://community.auth0.com/t/stateparameters-ruby-on-rails-application-omniauth-auth0/113348/3 "2023-08-10T14:29:01Z")

</div>

I saw this thread: [Adding an extra param to auth0 call](https://community.auth0.com/t/adding-an-extra-param-to-auth0-call/57720)

but how will i add the state parameter here:

```auto
Rails.application.config.middleware.use OmniAuth::Builder do
  provider(
    :auth0,
    ENV["AUTH0_EXTERNAL_RWA_CLIENT_ID"],
    ENV["AUTH0_EXTERNAL_RWA_CLIENT_SECRET"],
    ENV["AUTH0_EXTERNAL_DOMAIN"],
    callback_path: '/auth/auth0/callback',
    authorize_params: {
      scope: 'openid profile email',
      connection: ENV["AUTH0_EXTERNAL_DATABASE_CONNECTION"],
      state: ???????
    }
  )
end

```

---

_[View the full topic](https://community.auth0.com/t/stateparameters-ruby-on-rails-application-omniauth-auth0/113348)._
