Skip to content

Commit 9383e08

Browse files
authored
Hotfix 'Attribute error in generate code_challenge ex.' (#1205)
* Hotfix 'Attribute error in generate code_challing ex.' * Added new authors 'Islam Kamel'
1 parent fc0906d commit 9383e08

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Authors
33

44
Massimiliano Pippi
55
Federico Frenguelli
6+
Islam Kamel
67

78
Contributors
89
------------

docs/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ Now let's generate an authentication code grant with PKCE (Proof Key for Code Ex
268268
code_verifier = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(random.randint(43, 128)))
269269
code_verifier = base64.urlsafe_b64encode(code_verifier.encode('utf-8'))
270270

271-
code_challenge = hashlib.sha256(code_verifier.encode('utf-8')).digest()
271+
code_challenge = hashlib.sha256(code_verifier).digest()
272272
code_challenge = base64.urlsafe_b64encode(code_challenge).decode('utf-8').replace('=', '')
273273

274274
Take note of ``code_challenge`` since we will include it in the code flow URL. It should look something like ``XRi41b-5yHtTojvCpXFpsLUnmGFz6xR15c3vpPANAvM``.

0 commit comments

Comments
 (0)