-
Notifications
You must be signed in to change notification settings - Fork 328
Description
Hi Vouch team!
I am using Vouch with Github as the IDP. Today I got this email from Github:
This is a notice that your apps need to be updated to be compatible with a new security feature on github.com.
GitHub added PKCE support (RFC 7636) for the OAuth flow this week - see this changelog announcement from Monday. While rolling out the feature, we found that some applications were already using PKCE, but in a way that was incompatible with GitHub’s implementation - including yours.
You have been granted a 60 day exemption to update use of PKCE during user sign-in for the following apps:
• GitHub Apps: N/A
• OAuth Apps: (masked)
Please validate your application is correctly using PKCE:
- On the authorization leg, include both the code_challenge_method and code_challenge query parameters. 1. code_challenge_method must be S256. We do not support plain.
- The code_challenge must be the base64 Url_encoding of the SHA-256 hash of the code_verifier.
- On the authorization code exchange leg, include the code_verifier that was used to generate the code_challenge. The verifier must be at least 43 characters.
To use PKCE, your app must send both authorization leg parameters and must send the code_verifier on the authorization code exchange leg. Your app was exempted from this rollout due to finding one or more of the following issues:
- Not sending the code_verifier after beginning authentication with a challenge and method.
- Including only one of code_challenge_method or code_challenge but not both.
- Sending an invalid code_challenge – it must be 43 characters in length.
- Using a plain code challenge method instead of S256.
- Sending an invalid code_verifier that did not match the code_challenge or was too short.
To update your application, please ensure that the above issues are resolved. You can create a new application to test your authentication flow to ensure that it works. To learn more about GitHub’s support for PKCE, see our developer documentation:
• Authenticating users with GitHub Apps
• Authenticating with OAuth apps
I checked your code and also my config, and found that S256 is indeed already the default code challenge method for Github.
I also confirmed that the code_challenge is 43 characters.
Based on the list above of possible reasons, it would then imply one or both of:
- Not sending the code_verifier after beginning authentication with a challenge and method.
- Sending an invalid code_verifier that did not match the code_challenge or was too short.
So I'm not clear on what else needs to change? Based on the above, should I change something in my config, or (I suspect) is this a deeper change that needs to happen in Vouch itself to support the Github PKCE flow?
Thanks for any advice!