mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #556] Need method to generate random code verifier and code challenge #369
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#369
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dingtianran on GitHub (Nov 6, 2019).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/556
Need some helper methods to generate random code verifier and code challenge. In order to adapt pace protocol, currently I'm using two class methods from https://github.com/openid/AppAuth-iOS to generate them. I think it'll be very handy to have them in
OAuthSwiftas well.like:
+ (nullable NSString *)generateCodeVerifier;+ (nullable NSString *)codeChallengeS256ForVerifier:(nullable NSString *)codeVerifier;@phimage commented on GitHub (Nov 6, 2019):
@dingtianran
you use it to connect to?
there is an openID layer upon oauth2?
@phimage commented on GitHub (Nov 16, 2019):
I see that seconde function depend on sha256 https://github.com/OAuthSwift/OAuthSwift/issues/540
https://tools.ietf.org/html/rfc7636#section-4.2
code_challenge = BASE64URL-ENCODE(SHA256(ASCII(code_verifier)))
@MrWoWander commented on GitHub (Mar 2, 2021):
I wrote and sent to the PR #647 generator random code verifier and code challenge