Closed snewcomer closed 3 years ago
@snewcomer I think this is a good idea and should be supported not just by this strategy but all of them. What do you think about that?
@hassox / @yordis we've talked about this a little, want to weigh in?
@doomspork this will be an issue, the best we do is exactly what @snewcomer propose.
Do we want to read the encoder from Ueberauth
instead of the strategies?
If we add this to every single strategy will be hard to maintain for us, also for the end users since they would need to change it per strategy.
I would prefer to put json_library/0
in Ueberauth
package and use it from the strategies. But I understand that it is a tradeoff since some people could ask for changing it only in specific strategies but at that moment I think they are not doing the right thing.
Seems like now you can use https://hexdocs.pm/ueberauth/0.6.3/Ueberauth.html#json_library/1
Currently, without Poison installed, decoding the response will fail. With the introduction of Jason, we could allow the consumer to specify their own json parser. What do you think? If you agree, I'll put up a small PR.
One idea I have via a config option:
config :ueberauth_twitter, json_library: Jason