Usually received 400 status code from Google Identity OAuth 2.0

Viewed 15

I'm working on the project that implement SSO feature using Google APIs and services. The implementation is in the backend which used Nestjs as an authentication micro-service. My logic using authentication code return from consent screen after signin success, then that code will be used to getToken from GG Apis. Sometime the return will be as status code 400 and message is: invalid_grant. I'd studied about this problem for a week, but no clue for me. Can anyone tell me why this is happen, and why it not happen for all request, about 20% of request will return this error message.

FW/lib: Nestjs/core: ^8.0.0 googleapis: ^95.0.0

0 Answers
Related