Skip to content

Commit ddcbee6

Browse files
committed
chore: add release-it
1 parent 2b2a26d commit ddcbee6

File tree

4 files changed

+198
-28
lines changed

4 files changed

+198
-28
lines changed

.release-it.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"git": {
3+
"requireBranch": "main",
4+
"commitMessage": "chore: release v${version}"
5+
},
6+
"hooks": {
7+
"before:init": ["git pull", "pnpm run lint"],
8+
"after:bump": "npx auto-changelog -p && npm run build"
9+
},
10+
"github": {
11+
"release": true
12+
},
13+
"npm": {
14+
"publish": true
15+
}
16+
}

CHANGELOG.md

Lines changed: 175 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,193 @@
1-
# Changelog
1+
### Changelog
22

3-
## b6bda8a4ff4564a6ae8fd8e180f3b57d2eaa5eb6...main
3+
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
44

5-
[compare changes](https://github.com/kinde-oss/kinde-typescript-sdk/compare/b6bda8a4ff4564a6ae8fd8e180f3b57d2eaa5eb6...main)
5+
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7-
### 🩹 Fixes
7+
#### [2.9.0](https://github.com/kinde-oss/kinde-typescript-sdk/compare/4.6.2...2.9.0)
88

9-
- Ts-lint errors ([93088de](https://github.com/kinde-oss/kinde-typescript-sdk/commit/93088de))
10-
- Exclude openid from client credentials flow ([eb33856](https://github.com/kinde-oss/kinde-typescript-sdk/commit/eb33856))
9+
- bug: prevent expiry exception when reading id token claims [`#61`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/61)
10+
- fix: logout redirect is not required [`#60`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/60)
11+
- feat: verify JWTs before accessing and storing [`#46`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/46)
12+
- feat: expose refreshTokens method [`#56`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/56)
13+
- feat: TS enhancements [`#53`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/53)
14+
- fix: ts-lint errors [`#51`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/51)
15+
- bug: exclude openid from client credentials flow [`#52`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/52)
16+
- feat: validate client secrets [`#49`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/49)
17+
- fix: generateRandomString returning double length [`#50`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/50)
18+
- fix: no openid scope crash [`#48`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/48)
19+
- feat: update API spec [`c1dbc27`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/c1dbc27885b8d0d0be5d87fab78ecba8f3e9c869)
20+
- chore: bump version and update API spec [`a863827`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/a86382740ba42675709c08e13a5ed256627f9e5f)
21+
- chore: prettier fix [`6cc94ab`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/6cc94ab21cd37baf9915dc14d72e8cf0b9cea3f1)
1122

12-
### ❤️ Contributors
23+
### [4.6.2](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.9.0...4.6.2)
1324

14-
- Daniel Rivers ([@DanielRivers](https://github.com/DanielRivers))
15-
- Leo Chen ([@coel](https://github.com/coel))
25+
> 24 January 2024
1626
17-
## a15b184fa88ad7a839779044cbe24f437e3fa5b6...2.7.0
27+
#### [v2.9.0](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.8.0...v2.9.0)
1828

19-
[compare changes](https://github.com/kinde-oss/kinde-typescript-sdk/compare/a15b184fa88ad7a839779044cbe24f437e3fa5b6...2.7.0)
29+
> 17 April 2024
2030
21-
### 🚀 Enhancements
31+
- feat: verify JWTs before accessing and storing [`#46`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/46)
32+
- chore: bump version and update API spec [`a863827`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/a86382740ba42675709c08e13a5ed256627f9e5f)
33+
- feat: cache JWKS across requests [`fa5530f`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/fa5530f64a1dc35f45a4f2a0249840e43d8d7d77)
34+
- allow reading expired id tokens [`fbe22fb`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/fbe22fb8fce4b07504f5580cc1ce79ececdad493)
2235

23-
- Validate client secrets ([08f89c1](https://github.com/kinde-oss/kinde-typescript-sdk/commit/08f89c1))
36+
#### [v2.8.0](https://github.com/kinde-oss/kinde-typescript-sdk/compare/2.7.2...v2.8.0)
2437

25-
### 🩹 Fixes
38+
> 20 March 2024
2639
27-
- Ensure that openid is always passed to the API ([32abdf7](https://github.com/kinde-oss/kinde-typescript-sdk/commit/32abdf7))
28-
- GenerateRandomString returning double length ([85e9e3e](https://github.com/kinde-oss/kinde-typescript-sdk/commit/85e9e3e))
40+
- feat: expose refreshTokens method [`#56`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/56)
41+
- feat: TS enhancements [`#53`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/53)
42+
- feat: update API spec [`c1dbc27`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/c1dbc27885b8d0d0be5d87fab78ecba8f3e9c869)
43+
- chore: prettier fix [`6cc94ab`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/6cc94ab21cd37baf9915dc14d72e8cf0b9cea3f1)
44+
- fix: build [`882696d`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/882696d5458b9e9c548d98bc5f3be8a215c57bfb)
2945

30-
### ✅ Tests
46+
#### [2.7.2](https://github.com/kinde-oss/kinde-typescript-sdk/compare/2.7.1...2.7.2)
3147

32-
- Update tests ([3c29168](https://github.com/kinde-oss/kinde-typescript-sdk/commit/3c29168))
48+
> 11 March 2024
3349
34-
### ❤️ Contributors
50+
- fix: ts-lint errors [`#51`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/51)
51+
- bug: exclude openid from client credentials flow [`#52`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/52)
52+
- chore: release v2.7.2 [`52e5bba`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/52e5bba6c14b072e41ffa6c71d4829719e8eb599)
53+
- update tests [`1f24555`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/1f245553fe9a33fdfa6de812b4b6ef66bd631987)
54+
- update tests [`22dc250`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/22dc25097877008df4f69d353a7e340c7328ae57)
3555

36-
- Daniel Rivers ([@DanielRivers](http://github.com/DanielRivers))
56+
#### [2.7.1](https://github.com/kinde-oss/kinde-typescript-sdk/compare/2.7.0...2.7.1)
3757

38-
## 2.7.0...2.7.0
58+
> 7 March 2024
3959
40-
[compare changes](https://github.com/kinde-oss/kinde-typescript-sdk/compare/2.7.0...2.7.0)
60+
- chore: add changelog [`ddbb6b6`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/ddbb6b6a7c2ebba9d7f442491e344470821fb485)
61+
- chore: release v2.7.1 [`b6bda8a`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/b6bda8a4ff4564a6ae8fd8e180f3b57d2eaa5eb6)
62+
63+
#### [2.7.0](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.6.2...2.7.0)
64+
65+
> 7 March 2024
66+
67+
- feat: validate client secrets [`#49`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/49)
68+
- fix: generateRandomString returning double length [`#50`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/50)
69+
- fix: no openid scope crash [`#48`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/48)
70+
- test: update tests [`3c29168`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/3c29168d9ead4b8d20515197b1009ffc1d5c0d18)
71+
- fix: odd random string lengths [`ebc51a0`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/ebc51a08617403ada3f2ab5a391a959d8ff79ef2)
72+
- fix: ensure that openid is always passed to the API [`32abdf7`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/32abdf72168cc77be195d7993495f63db447e8e9)
73+
74+
#### [v2.6.2](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.6.1...v2.6.2)
75+
76+
> 11 March 2024
77+
78+
- feat: more explicit flow state error [`#45`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/45)
79+
- test: update tests [`20d0ecd`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/20d0ecd35f813cd5160c1acf36d4de30fc01ad93)
80+
- chore: bump version [`a15b184`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/a15b184fa88ad7a839779044cbe24f437e3fa5b6)
81+
- fix: unit test [`7b94f95`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/7b94f95809dbcb3394b03ba56df8926bc9cb6bb8)
82+
83+
#### [v2.6.1](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.6.0...v2.6.1)
84+
85+
> 24 January 2024
86+
87+
- feat: support multiple audiences [`#44`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/44)
88+
- chore: update audience type to be string array [`8712dcc`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/8712dcc24caf230f25593edb4f6f466a26c0ba0b)
89+
- fix: searchParams variable [`c8c034d`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/c8c034da24056aefec1a8973ee1362dce69b20f7)
90+
- chore: bump version [`44dee54`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/44dee54d59d3872cdd48af87b91242513a77ba33)
91+
92+
#### [v2.6.0](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.5.2...v2.6.0)
93+
94+
> 16 January 2024
95+
96+
- Use state if existing in session [`#43`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/43)
97+
- chore: make it use the prettier config that is there [`943f759`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/943f759927a390edd3b0a7397119fca4d01feb54)
98+
- chore: increase version [`e71146d`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/e71146d59369c666f6908f5b0fe45e8c629ec3bf)
99+
100+
#### [v2.5.2](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.5.1...v2.5.2)
101+
102+
> 12 January 2024
103+
104+
- Update to latest management API spec [`4a73c0d`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/4a73c0debd39a55c8abcb1c18fbbf15b1ecb6961)
105+
106+
#### [v2.5.1](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.5.0...v2.5.1)
107+
108+
> 12 January 2024
109+
110+
- Add OpenAPI generator [`#35`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/35)
111+
- Handle case where both `refresh_token` and `access_token` have expired [`#42`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/42)
112+
- Introduce generator, remove and ignore generated files, add generator step [`d997a4d`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/d997a4d0316dcaf2d176e91356372daa7f9d1fa3)
113+
- Clean generated files, add files used by OpenAPI, ignore generated files [`3b41808`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/3b41808e1350afba915d1ba91525f17b372efbf2)
114+
- test: wrote tests to verify changes introduced to token-utils [`428e124`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/428e1241f6cacd435bbbf61db5d3359576a98035)
115+
116+
#### [v2.5.0](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.4.0...v2.5.0)
117+
118+
> 23 December 2023
119+
120+
- exposing all management apis as a single object [`#38`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/38)
121+
- chore: exposing all management apis as a single object [`416684c`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/416684c3fe8e5f064b09eb764a354d1d29d2f76c)
122+
- chore: bump version [`0239214`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/0239214067fb170336a8b845e4a89f1b6bc9c7aa)
123+
124+
#### [v2.4.0](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.3.2...v2.4.0)
125+
126+
> 7 December 2023
127+
128+
- Change tsconfig target to es5 [`#36`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/36)
129+
- chore: bump version [`1fa754d`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/1fa754d8436feaeb75ba2a0f98c7cc9c8938fc39)
130+
131+
#### [v2.3.2](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.3.1...v2.3.2)
132+
133+
> 30 November 2023
134+
135+
- Allow `createKindeBrowserClient` with custom `SessionManager` [`#33`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/33)
136+
- chore: bump version [`12c9db7`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/12c9db7d166734a5a3ff2cc608d58170987638ca)
137+
138+
#### [v2.3.1](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.3.0...v2.3.1)
139+
140+
> 30 November 2023
141+
142+
- fix: don't store the decoded payload and decode when needed [`#32`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/32)
143+
- chore: bump version [`75d395c`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/75d395c6eb65fa512edcd92fa35dfe774b9bda2c)
144+
145+
#### [v2.3.0](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.2.0...v2.3.0)
146+
147+
> 17 November 2023
148+
149+
- fix: prevent trying to decode refresh token [`#31`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/31)
150+
- feat: include auth url params in payload [`#29`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/29)
151+
- Bugfix/id token expiry logout [`#26`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/26)
152+
- fix: ensured that `build-test-ci.yml` workflow runs pre/post scripts [`#28`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/28)
153+
- Bump @babel/traverse from 7.21.5 to 7.23.2 [`#24`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/24)
154+
- feat: created github action for building SDK and running tests [`#23`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/23)
155+
- feat: append post_login_redirect_url to search params [`#21`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/21)
156+
- Update README to Kinde OSS SDK template [`#19`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/19)
157+
- generated from latest API spec and bump version [`165743b`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/165743b630f3093c307671e56d4f88f52aafa563)
158+
- Update README to Kinde OSS Template [`7d70ba0`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/7d70ba07b640fbf9a2f8e2b36c0d843308355111)
159+
- fix: ensured that all server utilities preliminarily refresh tokens [`2f877bd`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/2f877bd0d4efaaa915b51e3462289bfaae3d7f5c)
160+
161+
#### [v2.2.0](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.1.0...v2.2.0)
162+
163+
> 21 September 2023
164+
165+
- feat: handle being used as an ES module in Node.js [`61b4aca`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/61b4acab114ac94a5ad24ef8dc397e78c2d6e11d)
166+
167+
#### [v2.1.0](https://github.com/kinde-oss/kinde-typescript-sdk/compare/v2.0.0...v2.1.0)
168+
169+
> 14 September 2023
170+
171+
- feat: add conditional types to createKindeServerClient to select the type of options and client [`28a3695`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/28a36954eb38e1a83691124bba3d598981f21746)
172+
173+
#### v2.0.0
174+
175+
> 12 September 2023
176+
177+
- fix: avoid forcing login [`#16`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/16)
178+
- updated README post migration to async methods [`#15`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/15)
179+
- feat: migrate codebase to async functions [`#13`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/13)
180+
- update: API updates [`#11`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/11)
181+
- ensured that `getFlag` throws error when `defaultValue === undefined` [`#10`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/10)
182+
- bugfix/random string and pollyfills [`#9`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/9)
183+
- Feature/sdk header override [`#8`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/8)
184+
- Feature/feedback 6 [`#7`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/7)
185+
- Feature/feedback 5 [`#6`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/6)
186+
- Feature/feedback 4 refresh tokens update [`#5`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/5)
187+
- Feature/feedback 3 [`#4`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/4)
188+
- Feature/feedback 2 [`#3`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/3)
189+
- Feature/feedback 1 [`#2`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/2)
190+
- feature/initial implementation [`#1`](https://github.com/kinde-oss/kinde-typescript-sdk/pull/1)
191+
- update: regenerate API from updated spec [`695416a`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/695416a4aaaf2b55d971b92b6255197362d89820)
192+
- added files generated by openapi-generator for endpoints and models [`71a76e8`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/71a76e88d578022dd9d46282094351211a1baa7d)
193+
- completed jest setup for unit-test coverage [`05a2134`](https://github.com/kinde-oss/kinde-typescript-sdk/commit/05a21347e0dfd4659d14d9abd8f33f7f0c43f7cc)

lib/sdk/utilities/token-claims.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ export const getClaimValue = async (
1818
): Promise<unknown | null> => {
1919
const token = (await sessionManager.getSessionItem(`${type}`)) as string;
2020
const key = await validationDetails.keyProvider();
21-
const decodedToken = await jwtVerify(token, key, type === 'id_token' ? { currentDate: new Date(0) } : {});
21+
const decodedToken = await jwtVerify(
22+
token,
23+
key,
24+
type === 'id_token' ? { currentDate: new Date(0) } : {}
25+
);
2226
const tokenPayload: Record<string, unknown> = decodedToken.payload;
2327
return tokenPayload[claim] ?? null;
2428
};

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,9 @@
2525
"build": "npm run generate && tsc && tsc -p tsconfig.cjs.json",
2626
"postbuild": "node sdk-version.js clean && ncp ./package-cjs.json ./dist-cjs/package.json && ncp ./package-esm.json ./dist/package.json",
2727
"prebuild": "node sdk-version.js && rimraf dist dist-cjs lib/models lib/apis",
28-
"lint": "eslint .",
29-
"lint:fix": "eslint --fix .",
30-
"prettier": "prettier . --check",
28+
"lint": "eslint . && prettier . --check",
29+
"lint:fix": "eslint --fix . && prettier . --check",
3130
"test": "jest --passWithNoTests",
32-
"prettier:fix": "prettier . --write",
33-
"format": "pnpm run prettier:fix && pnpm run lint:fix",
3431
"lint-staged": "lint-staged",
3532
"husky": "husky install",
3633
"generate": "npx @openapitools/openapi-generator-cli generate -i ./kinde-mgmt-api-specs.yaml -c ./generator-config.yaml -g typescript-fetch -o ./lib --additional-properties=importFileExtension=.js"

0 commit comments

Comments
 (0)