Skip to content

Commit 5ffcf73

Browse files
Add OAuth2 FileTokenStorage and OAuth2Manager with tests (#85)
- Implemented `FileTokenStorage` for managing OAuth2 token data using file storage, including methods for saving, loading, and clearing tokens. - Developed `OAuth2Manager` to handle OAuth2 authentication flow, including token retrieval and refresh logic. - Added comprehensive unit tests for both `FileTokenStorage` and `OAuth2Manager` to ensure functionality and error handling. - Introduced type definitions for `TokenData`, `TokenStorageProvider`, and `OAuth2Config` to enhance type safety and clarity. These changes establish a robust foundation for OAuth2 integration, improving token management and authentication processes in the application.
1 parent a5b6981 commit 5ffcf73

13 files changed

+1484
-0
lines changed

workers/main/package-lock.json

Lines changed: 114 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

workers/main/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"@eslint/js": "9.27.0",
1212
"@temporalio/testing": "1.11.8",
1313
"@types/node": "22.15.21",
14+
"@types/simple-oauth2": "5.0.7",
1415
"@vitest/coverage-v8": "3.1.3",
1516
"c8": "10.1.3",
1617
"dotenv": "16.5.0",
@@ -40,6 +41,7 @@
4041
"axios-retry": "4.5.0",
4142
"mongoose": "8.15.1",
4243
"mysql2": "3.14.1",
44+
"simple-oauth2": "5.1.0",
4345
"zod": "3.25.17"
4446
}
4547
}

0 commit comments

Comments
 (0)