Skip to content

Commit 2efdffd

Browse files
committed
Minor documentation fix
1 parent 28e155c commit 2efdffd

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
## 1.1.0+1
2+
3+
- Minor documentation fix.
4+
15
## 1.1.0
26

37
- __BREAKING__: Removed the `stripTrailingPadding` parameter as padding should always be removed as per the [spec](https://datatracker.ietf.org/doc/html/rfc7636#section-3).
48
If your code passed `stripTrailingPadding: true`, you can simply remove this parameter and the behavior won't change.
59
If your code passed `stripTrailingPadding: false` or didn't pass anything, the behavior _will_ change. This shouldn't be a problem, but feel free to open an issue if it is.
6-
- __BREAKING__: The `length` parameter now represents the length of the code verifier _before_ it is base64 encoded, so `length: 32` corresponds to a code verifier of length 44 and `length: 96` corresponds to a length of 128. The `length` parameter must be between 32 and 96, inclusive, and I strongly recommend using the default length of 32 suggested by the [spec](https://datatracker.ietf.org/doc/html/rfc7636#section-4.1).
10+
- __BREAKING__: The `length` parameter now represents the length of the code verifier _before_ it is base64 encoded, so `length: 32` corresponds to a code verifier of length 43 and `length: 96` corresponds to a length of 128. The `length` parameter must be between 32 and 96, inclusive, and I strongly recommend using the default length of 32 suggested by the [spec](https://datatracker.ietf.org/doc/html/rfc7636#section-4.1).
711

812
## 1.0.0+1
913

lib/pkce.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class PkcePair {
2121
///
2222
/// [length] is the length used to generate the [codeVerifier]. It must be
2323
/// between 32 and 96, inclusive, which corresponds to a [codeVerifier] of
24-
/// length between 44 and 128, inclusive. The spec recommends a length of 32.
24+
/// length between 43 and 128, inclusive. The spec recommends a length of 32.
2525
factory PkcePair.generate({int length = 32}) {
2626
if (length < 32 || length > 96) {
2727
throw ArgumentError.value(

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: pkce
22
description: Generates code verifier and code challenge pairs for PKCE (Proof Key for Code Exchange).
3-
version: 1.1.0
3+
version: 1.1.0+1
44
homepage: https://github.com/nrubin29/pkce_dart
55

66
environment:

test/pkce_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ void main() {
66
group('length', () {
77
test('is correct for min length', () {
88
final pkcePair = PkcePair.generate(length: 32);
9-
expect(pkcePair.codeVerifier, hasLength(44));
9+
expect(pkcePair.codeVerifier, hasLength(43));
1010
});
1111

1212
test('is correct for max length', () {

0 commit comments

Comments
 (0)