lib/rodauth/features/oauth_pkce.rb in rodauth-oauth-1.3.0 vs lib/rodauth/features/oauth_pkce.rb in rodauth-oauth-1.3.1
- old
+ new
@@ -74,11 +74,10 @@
case grant[oauth_grants_code_challenge_method_column]
when "plain"
challenge == verifier
when "S256"
- generated_challenge = Base64.urlsafe_encode64(Digest::SHA256.digest(verifier))
- generated_challenge.delete_suffix!("=") while generated_challenge.end_with?("=")
+ generated_challenge = Base64.urlsafe_encode64(Digest::SHA256.digest(verifier), padding: false)
challenge == generated_challenge
else
redirect_response_error("unsupported_transform_algorithm")
end