Skip to content

Commit d17d991

Browse files
authored
Update oauth2-develop.md (#1037)
## Changes - Changed wording from "decomposed" to "decoded" when talking about parsing url parameters into objects - Added missing bracket in the code example for generating a code challenge - Removed extra space <!-- Please link to any applicable information (forum posts, bug reports, etc.). --> ## Checks By submitting your pull request for review, you agree to the following: - [x] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses. - [x] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses. - [x] To the best of my knowledge, all proposed changes are accurate.
1 parent 59cf582 commit d17d991

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

content/en-us/cloud/open-cloud/oauth2-develop.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ the programming language of your choice to create the code verifier, calculate
4646
the hash, and perform Base64 encoding to generate the code challenge.
4747

4848
When creating the code verifier, only use unreserved characters, including
49-
uppercase and lowercase letters (A-Z , a-z), decimal digits (0-9), hyphen (-),
49+
uppercase and lowercase letters (A-Z, a-z), decimal digits (0-9), hyphen (-),
5050
period (.), underscore (\_), and tilde (~), with a minimum length of 43
5151
characters and a maximum length of 128 characters.
5252

@@ -67,6 +67,7 @@ function base64URLEncode(str) {
6767
// create sha256 hash from code verifier
6868
function sha256(buffer) {
6969
return crypto.createHash('sha256').update(buffer).digest(`base64`);
70+
}
7071

7172
// create a random code verifier
7273
var code_verifier = base64URLEncode(crypto.randomBytes(32));
@@ -130,7 +131,7 @@ value previously) parameters.
130131

131132
- The `code` parameter contains an authorization code that the app can
132133
exchange for an access token from the authorization server. Most backend
133-
server languages have standard ways to access query parameters as decomposed
134+
server languages have standard ways to access query parameters as decoded
134135
objects. You'll need to obtain the `code` parameter and use it to exchange
135136
for access tokens.
136137

0 commit comments

Comments
 (0)