Open lubc opened 8 years ago
hi there! I've been experiencing the same issue, just what i did was to overload in the class with my auth_url or creating my self a valid url. Did you solved it already?
hi @r1goo ! yes, I did a PR to this gem with the solution but they never did the review, so it's not merged yet. You can check it out here: https://github.com/mercadolibre/ruby-sdk/pull/11
thanks 4 your reply @lubc! I've just modify every file as your PR, but im still getting redirected to BR. I also restared the server and hardcoded this in meli.rb .
def auth_url(redirect_URI, iso_country_code = "UY")
and here
`def self.auth_url_country(iso_country_code)
const_get "https://auth.mercadolibre.com.uy/authorization"
end`
Should i install any gem?
thanks in advance 4 your help bro!
It seems that it's not possible to dynamically change the
auth_url
setting because it's always using the value inconfig.yml
.I’m using this gem in an application with users from different countries (AR, CL, MX, CO), so I have one ML app for each of those countries.
But after running
meli.auth_url(callback)
it never works becauseauth_url
is always pointing to Brasil, and none of my ML Applications are from there.I think that one solution could be that the
initialize
method inmeli.rb
could take an extra param for this purpose. With that, theauth_url
inside theconfig.yml
would just act as the default value.