Skip to content

Add strategy option for PKCE

Compare
Choose a tag to compare
@BobbyMcWho BobbyMcWho released this 11 Aug 15:41
· 40 commits to master since this release
a8d8e27

v1.7.0 adds the option to specify that your strategy should utilize PKCE.

Simply add the pkce option to your strategy and set it to true:

option :pkce, true

By default, this uses the recommended code_challenge_method of "S256", but in the event that you want to use basic, or some other future code challenge method, you can specify them in your strategy as well:

option :pkce_options, {
  :code_challenge => proc { |verifier| verifier },
  :code_challenge_method => "basic",
}

Note that the code_challenge must be supplied in the form of something that responds to call.