@better-auth/oauth-provider 1.5.0-beta.18 → 1.5.0-beta.19
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 +17 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +34 -32
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Better Auth OAuth Provider Plugin
|
|
2
|
+
|
|
3
|
+
OAuth provider plugin for [Better Auth](https://www.better-auth.com) — turn your application into an OAuth 2.0 provider.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @better-auth/oauth-provider
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Documentation
|
|
12
|
+
|
|
13
|
+
For full documentation, visit [better-auth.com/docs/plugins/oauth-provider](https://www.better-auth.com/docs/plugins/oauth-provider).
|
|
14
|
+
|
|
15
|
+
## License
|
|
16
|
+
|
|
17
|
+
MIT
|
package/dist/index.mjs
CHANGED
|
@@ -668,7 +668,7 @@ async function handleRefreshTokenGrant(ctx, opts) {
|
|
|
668
668
|
});
|
|
669
669
|
if (!refreshToken) throw new APIError("BAD_REQUEST", {
|
|
670
670
|
error_description: "session not found",
|
|
671
|
-
error: "
|
|
671
|
+
error: "invalid_grant"
|
|
672
672
|
});
|
|
673
673
|
if (refreshToken.clientId !== client_id) throw new APIError("BAD_REQUEST", {
|
|
674
674
|
error_description: "invalid client_id",
|
|
@@ -676,7 +676,7 @@ async function handleRefreshTokenGrant(ctx, opts) {
|
|
|
676
676
|
});
|
|
677
677
|
if (refreshToken.expiresAt < /* @__PURE__ */ new Date()) throw new APIError("BAD_REQUEST", {
|
|
678
678
|
error_description: "invalid refresh token",
|
|
679
|
-
error: "
|
|
679
|
+
error: "invalid_grant"
|
|
680
680
|
});
|
|
681
681
|
if (refreshToken.revoked) {
|
|
682
682
|
await ctx.context.adapter.deleteMany({
|
|
@@ -691,7 +691,7 @@ async function handleRefreshTokenGrant(ctx, opts) {
|
|
|
691
691
|
});
|
|
692
692
|
throw new APIError("BAD_REQUEST", {
|
|
693
693
|
error_description: "invalid refresh token",
|
|
694
|
-
error: "
|
|
694
|
+
error: "invalid_grant"
|
|
695
695
|
});
|
|
696
696
|
}
|
|
697
697
|
const scopes = refreshToken?.scopes;
|