Hi I'm using supertoken with node-fastify and reac...
# support-questions-legacy
u
Hi I'm using supertoken with node-fastify and react on front end. I'm getting a wired error on
thirdPartySignInAndUp
function. This is the error {type: 'cors', url: 'http://localhost:20070/auth/signinup', redirected: false, status: 500, ok: false, …}
r
Hey @undesiredmonk
What does the network request tab on chrome show?
u
This is the error on the network tab
r
Ah ok. So it seems that there is some issue in the social login config.
@sattvikc can help here.
u
Been stuck on this for some time. Would appreciate a help.
r
Sure. A few things to check: - Make sure the provided clientId and secret are correct. - Make sure that if you have given custom scope, it includes email. - If you are making any customisations to signInUp API or have made a custom provider, then show us the code here. - Make sure that the redirect URL configured on the provider's dashboard is correct.
u
- Client ID and secrets are correct. The redirect URL is called. - No customizations or to signInUp API, Its happening with Google login
r
alright. So let's wait for @sattvikc to help here.. he will be available tomorrow.
u
Anything I could have missed. I'm working with a strict deadline.
r
nothing obvious it seems. One thing to try is that you can use our dev google credentials (in the docs) and does it work with that?
u
Can you share the link?
r
u
The wired thing is I'm getting the user details. Even though there is an error.
r
hmmm interesting
what is throwing that error?
the cors thing
u
r
wait.. but the previous screenshot says request failed with 500
and this last screenshot is giving a response
So you are getting a 500 status code with the correct response body?
u
yes
r
thats very weird
the issue might be with your cors middleware
what framework are you using on the backend?
and how have you configured cors?
u
fastify
Yes cors is configured.
r
how? Can i see the code?
u
Give me a moment. I'll check it once throughly.
Cors config above.
r
can you hardcode the origin instead of using config.appOrigin[0]?
u
Was able to resolve the issue. Looks like the plugin was not properly registered.
r
Ah. The CORS one or supertokens one?
u
Yes.
r
Which one?
u
@rp_st This
r
Was there an issue in our docs about it? Or something else?
u
It was my mistake. Somehow I had two instance of fastify registered.
r
Hmm. I see. Ok!
I’m glad you solved it šŸ™‚
u
Thanks for the help. Sorry to bother you with my silly mistake.