Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
Browser requests to the token endpoint must use Proof Key for Code Exchange

I am getting the error "Browser requests to the token endpoint must use Proof Key for Code Exchange" when trying to post the following request from my code. But the same is working from the postman. Am I missing anything here?

  const urlEncodeData = qs.stringify({
            grant_type: "client_credentials",
            client_id: "xxxxxxxxxxxx",
            client_secret: "xxxxxxxxxxxxx",
            scope: Scope,
        });
        const headers: any = {
            "Content-Type": "application/x-www-form-urlencoded",
          
        };

        const tokenData = await axios.post(
            `${issuer}/v1/token`,
            urlEncodeData,
            headers
        );

I tried using qs and urlsearchparams and nothing worked.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

I believe the problem is that client_credentials flow assumes that you will be initiating a call to /token endpoint from a back-end server and not from your browser. So it might be an additional security check on Okta side, to discourage the use of inappropriate mechanisms/solutions

about 4 years ago · Juan Pablo Isaza Report

0

For client side application you are using and you should use PKCE Flow. Postman works because you are testing implicit flow, not the PKCE flow.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!