Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoDB Realm has [error exchanging access code with OAuth2 provider]

I am currently creating a simple app with the purposes are:

  • Sign In with Google through GoogleSignInSDK then get the token from google, and use that for io.realm.mongodb.Credentials.google(token).
  • But I always get the error E/SignInActivity: AUTH_ERROR(realm::app::ServiceError:47): error exchanging access code with OAuth2 provider.

I tried:

  • Followed unclear guidelines from https://docs.mongodb.com/realm/authentication/google/#set-up-a-project-in-the-google-api-console.
  • I cannot found my Client Secret when I declare the app is Android on Google Cloud Platform Console.
  • I found Client Secret and Client ID when I declare the app is Android on Google Cloud Platform Console.
  • Nothing works.

[Error on realm.mongodb.com][1][1]: https://i.stack.imgur.com/Esgi5.png

Thanks so much for reading this, I hopelessly waiting for anyone who has a solution for the same problems.

Tran Thanh Trong

like image 768
Tran Thanh Trong Avatar asked Nov 07 '22 06:11

Tran Thanh Trong


1 Answers

I encountered this bug too and it seems that it's being treated as a known issue by the developers.

https://github.com/realm/realm-js/issues/3116

like image 138
jsaigle Avatar answered Nov 09 '22 14:11

jsaigle