@objectstack/plugin-auth 7.1.0 → 7.2.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/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1028,18 +1028,22 @@ var AuthManager = class {
|
|
|
1028
1028
|
plugins.push(jwt({ schema: buildJwtPluginSchema() }));
|
|
1029
1029
|
const { oauthProvider } = await import("@better-auth/oauth-provider");
|
|
1030
1030
|
const baseUrl = (this.config.baseUrl ?? "").replace(/\/$/, "");
|
|
1031
|
+
const uiBase = (this.config.uiBasePath ?? "/_console").replace(/\/$/, "");
|
|
1031
1032
|
plugins.push(oauthProvider({
|
|
1032
|
-
//
|
|
1033
|
-
|
|
1034
|
-
|
|
1033
|
+
// Console SPA renders both pages (replaces the legacy Account SPA at
|
|
1034
|
+
// /_account). Override `uiBasePath` in AuthConfig if Console is
|
|
1035
|
+
// mounted elsewhere.
|
|
1036
|
+
loginPage: `${baseUrl}${uiBase}/login`,
|
|
1037
|
+
consentPage: `${baseUrl}${uiBase}/oauth/consent`,
|
|
1035
1038
|
schema: buildOauthProviderPluginSchema()
|
|
1036
1039
|
}));
|
|
1037
1040
|
}
|
|
1038
1041
|
if (enabled.deviceAuthorization) {
|
|
1039
1042
|
const { deviceAuthorization } = await import("better-auth/plugins/device-authorization");
|
|
1040
1043
|
const baseUrl = (this.config.baseUrl ?? "").replace(/\/$/, "");
|
|
1044
|
+
const uiBase = (this.config.uiBasePath ?? "/_console").replace(/\/$/, "");
|
|
1041
1045
|
plugins.push(deviceAuthorization({
|
|
1042
|
-
verificationUri: `${baseUrl}/
|
|
1046
|
+
verificationUri: `${baseUrl}${uiBase}/auth/device`,
|
|
1043
1047
|
schema: buildDeviceAuthorizationPluginSchema()
|
|
1044
1048
|
}));
|
|
1045
1049
|
}
|