abckit 0.0.32 → 0.0.33

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/module.d.mts CHANGED
@@ -45,6 +45,12 @@ interface AuthClientOptions {
45
45
  * @default false
46
46
  */
47
47
  capacitor?: boolean;
48
+ /**
49
+ * Enable OAuth 2.1 Provider client plugin
50
+ * Adds oauth2.* methods to authClient for consent management, client registration, etc.
51
+ * @default false
52
+ */
53
+ oauthProvider?: boolean;
48
54
  }
49
55
  interface ModulesConfig {
50
56
  /**
@@ -193,6 +199,7 @@ declare module '@nuxt/schema' {
193
199
  baseURL?: string;
194
200
  basePath?: string;
195
201
  capacitor?: boolean;
202
+ oauthProvider?: boolean;
196
203
  };
197
204
  };
198
205
  }
package/dist/module.mjs CHANGED
@@ -193,7 +193,8 @@ function setupRuntimeConfig(nuxt, options, isSentryEnabled) {
193
193
  auth: {
194
194
  baseURL: isMobileBuild ? mobileBaseURL : nuxt.options.runtimeConfig.public.abckit?.auth?.baseURL ?? options.auth?.baseURL,
195
195
  basePath: nuxt.options.runtimeConfig.public.abckit?.auth?.basePath ?? options.auth?.basePath,
196
- capacitor: isMobileBuild
196
+ capacitor: isMobileBuild,
197
+ oauthProvider: options.auth?.oauthProvider ?? false
197
198
  }
198
199
  };
199
200
  nuxt.options.runtimeConfig.dragonfly = defu(nuxt.options.runtimeConfig.dragonfly, DRAGONFLY_DEFAULTS);
@@ -1,4 +1,5 @@
1
1
  import { navigateTo, useRuntimeConfig } from "#app";
2
+ import { oauthProviderClient } from "@better-auth/oauth-provider/client";
2
3
  import { adminClient } from "better-auth/client/plugins";
3
4
  import { createAuthClient } from "better-auth/vue";
4
5
  import { computed, ref, watch } from "vue";
@@ -28,6 +29,9 @@ function getAuthClient() {
28
29
  const isCapacitor = authConfig?.capacitor ?? false;
29
30
  initOfflineSession(isCapacitor);
30
31
  const plugins = [adminClient()];
32
+ if (authConfig?.oauthProvider) {
33
+ plugins.push(oauthProviderClient());
34
+ }
31
35
  if (isCapacitor) {
32
36
  plugins.push(capacitorClient({
33
37
  storagePrefix: "better-auth"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "abckit",
3
3
  "type": "module",
4
- "version": "0.0.32",
4
+ "version": "0.0.33",
5
5
  "description": "Nuxt 4 module — UI components, auth, storage, GraphQL",
6
6
  "author": "productdevbook",
7
7
  "license": "MIT",
@@ -124,6 +124,7 @@
124
124
  "@vueuse/sound": "^2.1.3",
125
125
  "apiful": "^4.0.0",
126
126
  "aws4fetch": "^1.0.20",
127
+ "@better-auth/oauth-provider": "^1.4.9",
127
128
  "better-auth": "^1.4.7",
128
129
  "capacitor-native-settings": "^7.0.2",
129
130
  "class-variance-authority": "^0.7.1",