- [#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.
- **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`).
- **AuthFlow Class `src/providers/twitch/authFlow.ts`:** Encapsulates token exchange and user data retrieval, with robust error handling.
- **Token Operations `src/providers/twitch/refreshToken.ts`:** Provides functions for refreshing and revoking tokens.
- **Type Definitions `src/providers/twitch/types.ts:** Defines comprehensive types for Twitch API responses.
- **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.
- **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.
- [#588](https://github.com/honojs/middleware/pull/588) [`69eca66e4de153fa46a6298314a1688fd4efbe4c`](https://github.com/honojs/middleware/commit/69eca66e4de153fa46a6298314a1688fd4efbe4c) Thanks [@jokester](https://github.com/jokester)! - load env.SECRET with hono/adapter, to support non-worker
- [#505](https://github.com/honojs/middleware/pull/505) [`42e75f07dc4eef9a1cd3d88062fc90edd6677aeb`](https://github.com/honojs/middleware/commit/42e75f07dc4eef9a1cd3d88062fc90edd6677aeb) Thanks [@monoald](https://github.com/monoald)! - Requesting github for user email with token
- [#454](https://github.com/honojs/middleware/pull/454) [`65418948ab4e977102dabe6373246890a337e5e9`](https://github.com/honojs/middleware/commit/65418948ab4e977102dabe6373246890a337e5e9) Thanks [@aaronware](https://github.com/aaronware)! - Allow for an optional state arg to be passed to Google Auth middleware
- [#279](https://github.com/honojs/middleware/pull/279) [`cfaa80a`](https://github.com/honojs/middleware/commit/cfaa80a9e723c4af6e30eb796321db5184a7a6d5) Thanks [@rawkode](https://github.com/rawkode)! - ensure CSRF state returned to GitHub apps
- [#280](https://github.com/honojs/middleware/pull/280) [`14443cc`](https://github.com/honojs/middleware/commit/14443cc255735cc25b85f18f83b1fb3b53583de6) Thanks [@rawkode](https://github.com/rawkode)! - ensure redirect to original URL for GitHub apps