Closed MattMSumner closed 6 years ago
Example app that works for me locally but not when deployed to Heroku: https://github.com/MattMSumner/google-oauth2-example
And here it is deployed https://google-oauth-example.herokuapp.com
Possibly a duplicate of https://github.com/crystal-lang/crystal/issues/5266
Definitely a duplicate of #5266.
When setting up oauth2 in a crystal app I could get everything running locally but upon deploying to heroku the oauth flow broke with:
We fixed this by copying the OAuth2 code and modifying it to accept a HTTP::Client instead of building one. Then we make ourselves a client that points to heroku's SSL certs:
And then we built a client like so:
So a possible solution could be to change OAuth2 to accept an option HTTP::Client.