Skip to content

Commit e394e64

Browse files
Version Packages (#1014)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent e5f3837 commit e394e64

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

.changeset/slow-days-knock.md

-17
This file was deleted.

packages/oauth-providers/CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# @hono/oauth-providers
22

3+
## 0.7.0
4+
5+
### Minor Changes
6+
7+
- [#981](https://github.com/honojs/middleware/pull/981) [`e5f383787c2bd47657f67a99074515eab969963b`](https://github.com/honojs/middleware/commit/e5f383787c2bd47657f67a99074515eab969963b) Thanks [@Younis-Ahmed](https://github.com/Younis-Ahmed)! - These chages introduces a Twitch OAuth provider, expanding the middleware's OAuth offerings. It includes a new middleware for Twitch authentication, a dedicated `AuthFlow` class, token refreshing/revocation/validation, and comprehensive type definitions. Detailed tests ensure correct behavior and error handling.
8+
9+
- **Twitch OAuth Middleware `src/providers/twitch/twitchAuth.ts`:** Implements the core authentication flow, handling state management, redirects, and context variable setting (`token`, `refresh-token`, `user-twitch`, `granted-scopes`).
10+
11+
- **AuthFlow Class `src/providers/twitch/authFlow.ts`:** Encapsulates token exchange and user data retrieval, with robust error handling.
12+
13+
- **Token Operations `src/providers/twitch/refreshToken.ts`:** Provides functions for refreshing and revoking tokens.
14+
15+
- **Type Definitions `src/providers/twitch/types.ts:** Defines comprehensive types for Twitch API responses.
16+
17+
- **Extensive Testing (`test/handlers.ts`, `test/index.test.ts`):** Includes unit tests covering redirection, valid code flow, error handling, refresh/revoke token, custom and built-in state scenarios, using a mock server.
18+
19+
- **Validate Token `src/providers/twitch/validateToken`**: That hit `/validate` endpoint to verify that the access token is still valid for reasons other than token expiring.
20+
321
## 0.6.2
422

523
### Patch Changes

packages/oauth-providers/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hono/oauth-providers",
3-
"version": "0.6.2",
3+
"version": "0.7.0",
44
"description": "Social login for Hono JS, integrate authentication with facebook, github, google and linkedin to your projects.",
55
"main": "dist/index.js",
66
"files": [
@@ -84,7 +84,7 @@
8484
"default": "./dist/providers/discord/index.js"
8585
}
8686
},
87-
"./twitch" : {
87+
"./twitch": {
8888
"import": {
8989
"types": "./dist/providers/twitch/index.d.mts",
9090
"default": "./dist/providers/twitch/index.mjs"

0 commit comments

Comments
 (0)