hi, we installed sentry to supertokens node backen...
# support-questions-legacy
b
hi, we installed sentry to supertokens node backend to figure out issues some users are having about google login and capture some errors happening. looks like google apis are failing and it is happening quite often. can someone tell why this is happening?
r
hey @bian do you have any error stack for these?
b
yeah, actually uploaded before once.
most of them looks like this.
r
since how many days is this happening?
b
i think this has been happening since forever as users were constantly reporting google login sometimes fails on first attempt.
r
i see.
can you reproduce it?
b
could capture yesterday trying to find out issue with thirdparty user id changing.
it happens randomly.
i can keep providing stack traces but i think they r pretty much the same.
r
So usually, we see this type of error only if the signinup API is getting called twice in a row where the second call fails cause google rejects the reuse of an auth code. This usually happens cause of an issue on the frontend side. Do you think this is happening?
b
in that case, it should reject with some error codes not just timeout, no?
r
Yes. That’s true.
Timeout is strange. Never really seen that happen before
I’m talking about the one that yields a 400 error though.
b
oh, yeah. about 400 error codes. this is inside response.
Copy code
data: { error: 'invalid_grant', error_description: 'Bad Request' }
r
right, so that happens when the API is called twice
the timeout error is strange and unusual
b
so this can happen when we make calls twice with same code?
r
yea
do you use custom UI on the frontend?
or our pre build react UI?
b
customized UI but most of part is the same as pre-built UI...
r
right. The part that's calling the signinup API on the frontend, is that from our pre built UI or custom UI?
b
we did some customizations like showing popup instead of redirect.
r
hmm.
Well, the API being called twice can be due to your customisations - im not sure. But our vanially pre built UI proetcts against calling it twice
b
so when is this api POST https://oauth2.googleapis.com/token called exactly?
r
so first, google redirects to the frontend which calls the signinup API expsosed by our backend SDK middleware. That API, calls the google's token endpoint.
b
so possibility is - frontend on callback url is double-calling signinup api, maybe?
r
yup
b
okay, i will check on that.
r
that would cause the 400 error that you see. But im not sure about the timeout one. If you find out the cause of that, please let us know 🙂
7 Views