How to get the Google OAuth2 refresh token?

calling that endpoint should indeed work. We had a similar issue with the Google refresh token here where the parameters were being passed successfully to Auth0, but not to Google. That thread may be helpful for you if you wanted to give it a glance. In that situation they needed to include connection_scope as well as scope for it to work. I am going to try reproducing the issue with your code. I will need some time to test this out.