I keep getting a code_verifier invalid 400 error code when I attempt to get an access token

I keep getting a code_verifier invalid 400 error code when I attempt to get an access token

AbrahamGue
Shopify Partner
2 0 0

I am trying to make a React Native application as a headless front end. I am, however, having issues with my customer API request when I attempt to retrieve a access token for my client. Despite all my debugging, I have not found a reason why my code_verifier would register as invalid in the Shopify server. I am wondering if anyone else has had this issue or might have a pointer for me to work with.

I am using the documentation as my main guide on how to authorize the client to make requests to the api and this is the step I get stuck in. I am following all the instructions and the only good hint as to what could be the issue is the code_verifier invalid. 

I have also used other tools to make sure that my code verifier and code challenge correspond with each other, which they do, and yet, the server always throws the same error.

Below is an example of the error I am getting (With my shop's id censored). If you have any tips or guides, please drop them below. Even the technical team said that it should be working and yet it is not.

 

{"_bodyBlob": {"_data": {"__collector": [Object], "blobId": "BEC39431-9CFA-41B9-A2F5-3550EF34393F", "name": "token.json", "offset": 0, "size": 73, "type": "application/json"}}, "_bodyInit": {"_data": {"__collector": [Object], "blobId": "BEC39431-9CFA-41B9-A2F5-3550EF34393F", "name": "token.json", "offset": 0, "size": 73, "type": "application/json"}}, "bodyUsed": false, "headers": {"map": {"cache-control": "private, no-store", "cf-cache-status": "DYNAMIC", "cf-ray": "8c9e67851c80336e-MIA", "content-language": "en-US", "content-security-policy": "frame-ancestors 'none'; report-uri /csp-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=access_and_auth%2Fcustomer_authentication_provider%2Ftokens_migration&source%5Bsection%5D=customer_authentication_provider&source%5Buuid%5D=cf5d28a9-b135-4170-8f5d-70a25b750e50-1727470628", "content-type": "application/json; charset=utf-8", "date": "Fri, 27 Sep 2024 20:57:08 GMT", "nel": "{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}", "report-to": "{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=x4jk9ONK6VYkLc%2BJ2%2BG68628wGAXIo5I7LzzjG%2FDylZ287%2BJFmcq%2FYlpxCqAThMSKz5DYK7c%2FgJAYxUaY1srCbEF00I%2BpIJDXFj6YSZuMk6MO7MDB73fH7GbnNKj\"}],\"group\":\"cf-nel\",\"max_age\":604800}", "server": "cloudflare", "server-timing": "processing;dur=35, cfRequestDuration;dur=93.999863", "strict-transport-security": "max-age=7889238", "vary": "Accept", "www-authenticate": "error=invalid_grant,error_description=code_verifier is invalid.", "x-content-type-options": "nosniff", "x-dc": "gcp-us-east1,gcp-us-east1,gcp-us-east1", "x-download-options": "noopen", "x-frame-options": "DENY", "x-permitted-cross-domain-policies": "none", "x-request-id": "cf5d28a9-b135-4170-8f5d-70a25b750e50-1727470628", "x-shardid": "272", "x-shopid": "**********", "x-sorting-hat-podid": "272", "x-sorting-hat-shopid": "*******", "x-xss-protection": "1; mode=block; report=/xss-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=access_and_auth%2Fcustomer_authentication_provider%2Ftokens_migration&source%5Bsection%5D=customer_authentication_provider&source%5Buuid%5D=cf5d28a9-b135-4170-8f5d-70a25b750e50-1727470628"}}, "ok": false, "status": 400, "statusText": "", "type": "default", "url": "https://shopify.com/******/auth/oauth/token"}

 

 

Replies 0 (0)