diff --git a/lib/omniauth/strategies/odoo_keycloak.rb b/lib/omniauth/strategies/odoo_keycloak.rb index 8b76573..7ef0a53 100644 --- a/lib/omniauth/strategies/odoo_keycloak.rb +++ b/lib/omniauth/strategies/odoo_keycloak.rb @@ -20,6 +20,22 @@ class OdooKeycloak < OmniAuth::Strategies::KeycloakOpenId def odoo_info @odoo_info ||= ::Decidim::Odoo::Api::FindPartnerByVat.new(raw_info["preferred_username"]).result end + + def authorize_params + super.tap do |param| + param[:kc_locale] = current_locale + end + end + + def query_string + "" + end + + private + + def current_locale + request.params["locale"] || I18n.default_locale + end end end end