#refresh_token is required in either the JSON payload or Cookie

10 messages · Page 1 of 1 (latest)

exotic dew
#

I am using a wrapper function around the native fetch. I get the refresh token after login. But i can't get the access token
This is my code:

#

This is a custom wrapper function i made

#

this is the actual function

#

I am getting refresh_token is required in either the JSON payload or Cookie

full heron
#

At the risk of stating the obvious 😬 as the error says your wrapper is not properly passing the refresh token

#

Aaah i think i see it

#
if (additionalHeaders) // will always be true for the defualt {}
  // overwrites params.headers with an empty object
  params.headers = additionalHeaders
exotic dew
#

Was it the missing of content-type header that caused it?