@better-auth/oauth-provider 1.6.0-beta.0 → 1.6.0
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/dist/client-resource.d.mts +1 -1
- package/dist/client-resource.mjs +1 -1
- package/dist/client.d.mts +1 -1
- package/dist/client.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +49 -10
- package/dist/oauth-CYgzO8Am.d.mts +2081 -0
- package/dist/{oauth-4vgZlF-I.d.mts → oauth-Cc0nzj5Q.d.mts} +19 -2
- package/dist/{version-DevbO3Yy.mjs → version-DNcPo3T3.mjs} +1 -1
- package/package.json +6 -6
- package/dist/oauth-CEoJtL3Y.d.mts +0 -1879
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JWSAlgorithms } from "better-auth/plugins";
|
|
2
2
|
import { JWTPayload } from "jose";
|
|
3
3
|
import { InferOptionSchema, Session, User } from "better-auth/types";
|
|
4
|
-
import { LiteralString } from "@better-auth/core";
|
|
4
|
+
import { GenericEndpointContext, LiteralString } from "@better-auth/core";
|
|
5
5
|
|
|
6
6
|
//#region src/schema.d.ts
|
|
7
7
|
declare const schema: {
|
|
@@ -952,13 +952,30 @@ interface OAuthOptions<Scopes extends readonly Scope[] = InternallySupportedScop
|
|
|
952
952
|
* @see https://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg
|
|
953
953
|
*/
|
|
954
954
|
pairwiseSecret?: string;
|
|
955
|
+
/**
|
|
956
|
+
* Resolves a `request_uri` at the authorize endpoint (PAR support).
|
|
957
|
+
*
|
|
958
|
+
* When the authorize endpoint receives a `request_uri` parameter, this callback
|
|
959
|
+
* resolves it to the original authorization parameters. Return null if the URI
|
|
960
|
+
* is invalid or expired.
|
|
961
|
+
*/
|
|
962
|
+
requestUriResolver?: (input: {
|
|
963
|
+
requestUri: string;
|
|
964
|
+
clientId: string;
|
|
965
|
+
ctx: GenericEndpointContext;
|
|
966
|
+
}) => Promise<Record<string, string> | null>;
|
|
955
967
|
}
|
|
956
968
|
interface OAuthAuthorizationQuery {
|
|
957
969
|
/**
|
|
958
970
|
* The response type.
|
|
959
971
|
* - "code": authorization code flow.
|
|
972
|
+
* Optional in the query when using request_uri (PAR) — resolved from stored params.
|
|
973
|
+
*/
|
|
974
|
+
response_type?: "code";
|
|
975
|
+
/**
|
|
976
|
+
* PAR request_uri. When present, other params are resolved from the stored request.
|
|
960
977
|
*/
|
|
961
|
-
|
|
978
|
+
request_uri?: string;
|
|
962
979
|
/**
|
|
963
980
|
* The redirect URI for the client. Must be one of the registered redirect URLs for the client.
|
|
964
981
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/oauth-provider",
|
|
3
|
-
"version": "1.6.0
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "An oauth provider plugin for Better Auth",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,15 +64,15 @@
|
|
|
64
64
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
65
65
|
"listhen": "^1.9.0",
|
|
66
66
|
"tsdown": "0.21.1",
|
|
67
|
-
"@better-auth/core": "1.6.0
|
|
68
|
-
"better-auth": "1.6.0
|
|
67
|
+
"@better-auth/core": "1.6.0",
|
|
68
|
+
"better-auth": "1.6.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"@better-auth/utils": "0.4.0",
|
|
72
72
|
"@better-fetch/fetch": "1.1.21",
|
|
73
|
-
"better-call": "
|
|
74
|
-
"@better-auth/core": "^1.6.0
|
|
75
|
-
"better-auth": "^1.6.0
|
|
73
|
+
"better-call": "1.3.5",
|
|
74
|
+
"@better-auth/core": "^1.6.0",
|
|
75
|
+
"better-auth": "^1.6.0"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"build": "tsdown",
|