# Zoom Oauth 2.0 PKCE implementation does not comply with RFC7636 specs, update the docs please

**URL:** <https://devforum.zoom.us/t/zoom-oauth-2-0-pkce-implementation-does-not-comply-with-rfc7636-specs-update-the-docs-please/68126>\
**Category:** API and Webhooks\
**Tags:** oauth, pkce\
**Created:** [April 26, 2022, 8:49am UTC](https://devforum.zoom.us/t/zoom-oauth-2-0-pkce-implementation-does-not-comply-with-rfc7636-specs-update-the-docs-please/68126 "2022-04-26T08:49:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephen2](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@stephen2](https://devforum.zoom.us/u/stephen2)\
**Post date:** [April 26, 2022, 8:49am UTC](https://devforum.zoom.us/t/zoom-oauth-2-0-pkce-implementation-does-not-comply-with-rfc7636-specs-update-the-docs-please/68126/1 "2022-04-26T08:49:43Z")

</div>

**Description**  
You are not following RFC7636 specs for S256 (sha256) code challenge method, but your documentation still refers to RFC7636. We spent 3 hours trying to get an access token using PKCE, only to discover this morning by reading a [post](https://devforum.zoom.us/t/zoom-oauth-2-0-proof-key-for-code-exchange-pkce-flow/63830) in this forum that you don’t apply the sha256() function as per specs, when you apply it to code\_verifier to see if it matches code\_challenge.

You use base64 instead of base64url encoding, and you apply base64 to the hex sha256() string instead of the binary 256bit hash (see example at the end of the RFC for the expected behavior).

Can you please update the documentation, saying that the implementation is non-standard and putting your example NodeJS code there?

My question: I understand from the other thread that you want to correct this behaviour, do you have already scheduled the correction? When will your PKCE algorithm change? I’m asking so that we can change our code at the same time.

Also, from the RFC:

> If the client is capable of using “S256”, it MUST use “S256”, as  
> “S256” is Mandatory To Implement (MTI) on the server.

Going with “plain” instead of “S256” is a security hole: the whole point of PKCE is trying to prevent that somebody can steal the authorization\_code and use it to get a valid access\_token…if you put a plain code\_challenge next to it, it serves no purpose as an attacker that can steal it as well together with the authorization\_code. In fact, you may as well not use PKCE at all.

**Error**  
Invalid authorization code - Invalid grant

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
OAuth PKCE

**Which Endpoint/s?**  
[https://zoom.us/oauth/authorize](https://zoom.us/oauth/authorize)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 26, 2022, 6:50pm UTC](https://devforum.zoom.us/t/zoom-oauth-2-0-pkce-implementation-does-not-comply-with-rfc7636-specs-update-the-docs-please/68126/2 "2022-05-26T18:50:13Z")

</div>

Closed on May 26, 2022, 6:50pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
