@hatkom/aws-auth 1.4.3 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.releaserc.json +17 -0
- package/CHANGELOG.md +14 -0
- package/README.md +37 -1
- package/bun.lock +1135 -0
- package/package.json +8 -5
package/.releaserc.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"branches": ["main"],
|
|
3
|
+
"plugins": [
|
|
4
|
+
"@semantic-release/commit-analyzer",
|
|
5
|
+
"@semantic-release/release-notes-generator",
|
|
6
|
+
"@semantic-release/changelog",
|
|
7
|
+
"@semantic-release/npm",
|
|
8
|
+
"@semantic-release/git",
|
|
9
|
+
[
|
|
10
|
+
"@semantic-release/github",
|
|
11
|
+
{
|
|
12
|
+
"successComment": false,
|
|
13
|
+
"failComment": false
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
]
|
|
17
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## [1.4.5](https://github.com/Hatkom-io/aws-auth/compare/v1.4.4...v1.4.5) (2026-03-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* tsconfig compiled wrong build ([39e3ced](https://github.com/Hatkom-io/aws-auth/commit/39e3ced05748674598b2502c3703fc318332265b))
|
|
7
|
+
|
|
8
|
+
## [1.4.4](https://github.com/Hatkom-io/aws-auth/compare/v1.4.3...v1.4.4) (2026-03-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* move to bun lock file ([e630f47](https://github.com/Hatkom-io/aws-auth/commit/e630f472e3d3b92ba217012fa64246707199132a))
|
|
14
|
+
* trigger publish ([e7b9e1c](https://github.com/Hatkom-io/aws-auth/commit/e7b9e1cefbffa4f0614314fe72ec995c62a85485))
|
package/README.md
CHANGED
|
@@ -1 +1,37 @@
|
|
|
1
|
-
# AWS Auth Client
|
|
1
|
+
# AWS Auth Client
|
|
2
|
+
|
|
3
|
+
A lightweight AWS Cognito authentication client built on top of `amazon-cognito-identity-js`.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm i @hatkom/aws-auth
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { AWSAuthClient } from '@hatkom/aws-auth'
|
|
15
|
+
|
|
16
|
+
const auth = new AWSAuthClient('us-east-1_xxxxxxx', 'xxxxxxxxxxxxxxxxxxxxxxxxxx')
|
|
17
|
+
|
|
18
|
+
// Sign in
|
|
19
|
+
const session = await auth.authenticateUser({ email: 'user@example.com', password: 'password' })
|
|
20
|
+
|
|
21
|
+
// Get current session token (auto-refreshes if expired)
|
|
22
|
+
const token = await auth.getCurrentSessionToken()
|
|
23
|
+
|
|
24
|
+
// Sign out
|
|
25
|
+
await auth.signOut()
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## API
|
|
29
|
+
|
|
30
|
+
- `authenticateUser({ email, password })` — sign in, returns session or `'new-password-required'`
|
|
31
|
+
- `getCurrentSessionToken()` — returns current access JWT, refreshing if needed
|
|
32
|
+
- `signOut()` — signs out the current user
|
|
33
|
+
- `completeNewPasswordChallenge({ username, newPassword })` — complete a new password challenge
|
|
34
|
+
- `forgotPassword(username)` — initiate forgot password flow
|
|
35
|
+
- `forgotPasswordSubmit({ username, verificationCode, password })` — submit new password
|
|
36
|
+
- `resendVerificationCode(username)` — resend email verification code
|
|
37
|
+
- `verifyUserEmail({ username, code })` — confirm email registration
|