@better-auth/core 1.6.24 → 1.6.25
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/context/global.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { ATTR_HTTP_RESPONSE_STATUS_CODE } from "./attributes.mjs";
|
|
|
2
2
|
import { getOpenTelemetryAPI } from "./api.mjs";
|
|
3
3
|
//#region src/instrumentation/tracer.ts
|
|
4
4
|
const INSTRUMENTATION_SCOPE = "better-auth";
|
|
5
|
-
const INSTRUMENTATION_VERSION = "1.6.
|
|
5
|
+
const INSTRUMENTATION_VERSION = "1.6.25";
|
|
6
6
|
/**
|
|
7
7
|
* Better-auth uses `throw ctx.redirect(url)` for flow control (e.g. OAuth
|
|
8
8
|
* callbacks). These are APIErrors with 3xx status codes and should not be
|
|
@@ -70,7 +70,7 @@ interface AppleOptions extends ProviderOptions<AppleProfile> {
|
|
|
70
70
|
declare const apple: (options: AppleOptions) => {
|
|
71
71
|
id: "apple";
|
|
72
72
|
name: string;
|
|
73
|
-
createAuthorizationURL({ state, scopes, redirectURI }: {
|
|
73
|
+
createAuthorizationURL({ state, scopes, redirectURI, codeVerifier }: {
|
|
74
74
|
state: string;
|
|
75
75
|
codeVerifier: string;
|
|
76
76
|
scopes?: string[] | undefined;
|
|
@@ -22,7 +22,7 @@ const apple = (options) => {
|
|
|
22
22
|
return {
|
|
23
23
|
id: "apple",
|
|
24
24
|
name: "Apple",
|
|
25
|
-
async createAuthorizationURL({ state, scopes, redirectURI }) {
|
|
25
|
+
async createAuthorizationURL({ state, scopes, redirectURI, codeVerifier }) {
|
|
26
26
|
if (!getPrimaryClientId(options.clientId) || !options.clientSecret) {
|
|
27
27
|
logger.error("Client ID and client secret are required for Apple. Make sure to provide them in the options.");
|
|
28
28
|
throw new BetterAuthError("CLIENT_ID_AND_SECRET_REQUIRED");
|
|
@@ -37,6 +37,7 @@ const apple = (options) => {
|
|
|
37
37
|
scopes: _scope,
|
|
38
38
|
state,
|
|
39
39
|
redirectURI,
|
|
40
|
+
codeVerifier,
|
|
40
41
|
responseMode: "form_post",
|
|
41
42
|
responseType: "code id_token"
|
|
42
43
|
});
|
|
@@ -43,7 +43,7 @@ declare const socialProviders: {
|
|
|
43
43
|
apple: (options: AppleOptions) => {
|
|
44
44
|
id: "apple";
|
|
45
45
|
name: string;
|
|
46
|
-
createAuthorizationURL({ state, scopes, redirectURI }: {
|
|
46
|
+
createAuthorizationURL({ state, scopes, redirectURI, codeVerifier }: {
|
|
47
47
|
state: string;
|
|
48
48
|
codeVerifier: string;
|
|
49
49
|
scopes?: string[] | undefined;
|
package/package.json
CHANGED
|
@@ -101,7 +101,7 @@ export const apple = (options: AppleOptions) => {
|
|
|
101
101
|
return {
|
|
102
102
|
id: "apple",
|
|
103
103
|
name: "Apple",
|
|
104
|
-
async createAuthorizationURL({ state, scopes, redirectURI }) {
|
|
104
|
+
async createAuthorizationURL({ state, scopes, redirectURI, codeVerifier }) {
|
|
105
105
|
if (!getPrimaryClientId(options.clientId) || !options.clientSecret) {
|
|
106
106
|
logger.error(
|
|
107
107
|
"Client ID and client secret are required for Apple. Make sure to provide them in the options.",
|
|
@@ -118,6 +118,7 @@ export const apple = (options: AppleOptions) => {
|
|
|
118
118
|
scopes: _scope,
|
|
119
119
|
state,
|
|
120
120
|
redirectURI,
|
|
121
|
+
codeVerifier,
|
|
121
122
|
responseMode: "form_post",
|
|
122
123
|
responseType: "code id_token",
|
|
123
124
|
});
|