@ley0x/better-auth-lastfm 1.0.0 → 1.0.2
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/README.md +6 -6
- package/package.json +8 -16
package/README.md
CHANGED
|
@@ -7,7 +7,6 @@ A clean, modern Last.fm authentication plugin for [BetterAuth](https://better-au
|
|
|
7
7
|
- 🔐 Complete Last.fm authentication flow implementation
|
|
8
8
|
- 🎵 Session key storage for Last.fm API calls
|
|
9
9
|
- 🌟 TypeScript support with full type safety
|
|
10
|
-
- ⚛️ React hooks for easy integration
|
|
11
10
|
- 🛠️ Modern architecture following BetterAuth patterns
|
|
12
11
|
- 🚀 Zero additional dependencies (except peer dependencies)
|
|
13
12
|
|
|
@@ -73,17 +72,18 @@ import { authClient } from './auth-client'
|
|
|
73
72
|
await authClient.signInWithLastfm()
|
|
74
73
|
```
|
|
75
74
|
|
|
76
|
-
### React
|
|
75
|
+
### React Component Example
|
|
77
76
|
|
|
78
|
-
```
|
|
79
|
-
import { useLastfm } from '@ley0x/better-auth-lastfm/react'
|
|
77
|
+
```typescript
|
|
80
78
|
import { authClient } from './auth-client'
|
|
81
79
|
|
|
82
80
|
function LoginButton() {
|
|
83
|
-
const
|
|
81
|
+
const handleSignIn = async () => {
|
|
82
|
+
await authClient.signInWithLastfm()
|
|
83
|
+
}
|
|
84
84
|
|
|
85
85
|
return (
|
|
86
|
-
<button onClick={
|
|
86
|
+
<button onClick={handleSignIn}>
|
|
87
87
|
Sign in with Last.fm
|
|
88
88
|
</button>
|
|
89
89
|
)
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ley0x/better-auth-lastfm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Last.fm authentication plugin for BetterAuth",
|
|
6
|
-
"main": "dist/index.
|
|
7
|
-
"module": "dist/index.
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/index.
|
|
13
|
-
"require": "./dist/index.
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
14
|
},
|
|
15
15
|
"./client": {
|
|
16
16
|
"types": "./dist/client/index.d.ts",
|
|
17
|
-
"import": "./dist/client/index.
|
|
18
|
-
"require": "./dist/client/index.
|
|
17
|
+
"import": "./dist/client/index.js",
|
|
18
|
+
"require": "./dist/client/index.cjs"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
@@ -41,13 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://github.com/ley0x/better-auth-lastfm#readme",
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"better-auth": "^0.x.x"
|
|
45
|
-
"react": ">=16.8.0"
|
|
46
|
-
},
|
|
47
|
-
"peerDependenciesMeta": {
|
|
48
|
-
"react": {
|
|
49
|
-
"optional": true
|
|
50
|
-
}
|
|
44
|
+
"better-auth": "^0.x.x"
|
|
51
45
|
},
|
|
52
46
|
"dependencies": {
|
|
53
47
|
"zod": "^3.25.76"
|
|
@@ -55,10 +49,8 @@
|
|
|
55
49
|
"devDependencies": {
|
|
56
50
|
"@eslint/js": "^9.33.0",
|
|
57
51
|
"@types/node": "^20.19.10",
|
|
58
|
-
"@types/react": "^18.3.23",
|
|
59
52
|
"better-auth": "latest",
|
|
60
53
|
"eslint": "^9.33.0",
|
|
61
|
-
"react": "^18.3.1",
|
|
62
54
|
"tsup": "^8.5.0",
|
|
63
55
|
"typescript": "^5.9.2",
|
|
64
56
|
"typescript-eslint": "^8.39.1",
|