Use omniauth-facebook when app id and app secret are different for each request?

后端 未结 3 1316
迷失自我
迷失自我 2020-12-31 11:38

The omniauth-facebook README mentions how to set it up in an initializer and how to set options like scope per request only. I wonder if it is possible to set a

3条回答
  •  萌比男神i
    2020-12-31 12:33

    If you are using devise you can do this

    config.omniauth  :facebook, :setup => lambda{
          current_app_secret = // Get current domain
          current_app_key = // Get config
          env['omniauth.strategy'].options[:client_id] = current_app_secret
          env['omniauth.strategy'].options[:client_secret] = current_app_key
        }
    

提交回复
热议问题