abckit 0.0.31 → 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.31",
4
+ "version": "0.0.33",
5
5
  "description": "Nuxt 4 module — UI components, auth, storage, GraphQL",
6
6
  "author": "productdevbook",
7
7
  "license": "MIT",
@@ -71,6 +71,17 @@
71
71
  "files": [
72
72
  "dist"
73
73
  ],
74
+ "scripts": {
75
+ "build": "nuxt-module-build build",
76
+ "prepack": "nuxt-module-build build",
77
+ "dev": "nuxt dev playground",
78
+ "dev:build": "nuxi build playground",
79
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
80
+ "lint": "eslint .",
81
+ "lint:fix": "eslint . --fix",
82
+ "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
83
+ "release": "pnpm publish --no-git-checks --access public"
84
+ },
74
85
  "dependencies": {
75
86
  "@capacitor/android": "7.4.4",
76
87
  "@capacitor/app": "^8.0.0",
@@ -113,6 +124,7 @@
113
124
  "@vueuse/sound": "^2.1.3",
114
125
  "apiful": "^4.0.0",
115
126
  "aws4fetch": "^1.0.20",
127
+ "@better-auth/oauth-provider": "^1.4.9",
116
128
  "better-auth": "^1.4.7",
117
129
  "capacitor-native-settings": "^7.0.2",
118
130
  "class-variance-authority": "^0.7.1",
@@ -130,7 +142,7 @@
130
142
  "graphql-scalars": "^1.25.0",
131
143
  "graphql-yoga": "^5.18.0",
132
144
  "md-editor-v3": "^6.2.1",
133
- "nitro-graphql": "^1.7.0",
145
+ "nitro-graphql": "^1.7.1",
134
146
  "nitropack": "^2.12.9",
135
147
  "notivue": "^2.4.5",
136
148
  "pg": "^8.16.3",
@@ -174,15 +186,5 @@
174
186
  "patchedDependencies": {
175
187
  "entities@7.0.0": "patches/entities@7.0.0.patch",
176
188
  "entities@7.0.0@7.0.0": "patches/entities@7.0.0.patch"
177
- },
178
- "scripts": {
179
- "build": "nuxt-module-build build",
180
- "dev": "nuxt dev playground",
181
- "dev:build": "nuxi build playground",
182
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
183
- "lint": "eslint .",
184
- "lint:fix": "eslint . --fix",
185
- "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
186
- "release": "pnpm publish --no-git-checks --access public"
187
189
  }
188
- }
190
+ }