summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2024-10-22 16:57:43 +0200
committergit <svn-admin@ruby-lang.org>2024-11-04 10:04:58 +0000
commit9ce1b5e11f807541ba9e3f7800fe4f64dfd1a906 (patch)
treebe38a953d142011f00a8061c32191f68cc7a1b0d /test/ruby
parent1b190b342b2f642cbba12cf6551df2bec7432d71 (diff)
[rubygems/rubygems] Fix commands with 2 MFA requests when webauthn is enabled
If a command requires two MFA authenticated requests, and webauthn is enabled, then first one will succeed but the second one will fail because it tries to reuse the OTP code from the first request and that does not work. This happens when you have not yet logged in to rubygems.org, or when you have an API key with invalid scopes for the current operation. In that case, we need: * An API request to get a token or change scopes for the one that you have. * Another API request to perform the actual operation. Instead of trying to reuse the token, make sure it's cleared so we are asked to authenticate again. We only do this when webauthn is enabled because reusing TOPT tokens otherwise is allowed and I don't want to break that. https://github.com/rubygems/rubygems/commit/669e343935
Diffstat (limited to 'test/ruby')
0 files changed, 0 insertions, 0 deletions