two-factor-authentification-tools 0.0.23 → 0.0.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/module.d.mts +5 -4
- package/dist/module.d.ts +5 -4
- package/dist/module.json +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/plugin.js +3 -2
- package/dist/runtime/{services → server/services}/twoAuth.service.d.ts +1 -1
- package/dist/runtime/{services → server/services}/twoAuth.service.js +4 -5
- package/dist/types.d.mts +6 -2
- package/package.json +3 -2
- /package/dist/runtime/{services → server/services}/index.d.ts +0 -0
- /package/dist/runtime/{services → server/services}/index.js +0 -0
package/dist/module.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
declare const _default: _nuxt_schema.NuxtModule<{
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
}, {
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
}, false>;
|
|
6
8
|
|
|
7
9
|
export { _default as default };
|
|
8
|
-
export type { ModuleOptions };
|
package/dist/module.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
declare const _default: _nuxt_schema.NuxtModule<{
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
}, {
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
}, false>;
|
|
6
8
|
|
|
7
9
|
export { _default as default };
|
|
8
|
-
export type { ModuleOptions };
|
package/dist/module.json
CHANGED
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './services/index.js';
|
|
1
|
+
export * from './server/services/index.js';
|
package/dist/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./services/index.js";
|
|
1
|
+
export * from "./server/services/index.js";
|
package/dist/runtime/plugin.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineNuxtPlugin } from "#app";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { twoAuthService } from "./server/services/twoAuth.service.js";
|
|
3
|
+
export default defineNuxtPlugin((nuxtApp) => {
|
|
4
|
+
nuxtApp.provide("twoAuthService", twoAuthService);
|
|
4
5
|
});
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { TwoFactorAuthentificatorAdapter } from "../
|
|
2
|
-
import { QRCodesAdapter } from "../
|
|
3
|
-
|
|
4
|
-
const activateTwoFactorAuth = async (user) => {
|
|
1
|
+
import { TwoFactorAuthentificatorAdapter } from "../adapters/twoFactorAuthentificator.adapters.js";
|
|
2
|
+
import { QRCodesAdapter } from "../adapters/QRCodes.adapters.js";
|
|
3
|
+
const activateTwoFactorAuth = async (user, appName) => {
|
|
5
4
|
const secret = TwoFactorAuthentificatorAdapter.generateSecret();
|
|
6
5
|
const otpauth = TwoFactorAuthentificatorAdapter.createKeyURI(
|
|
7
6
|
user.email,
|
|
8
|
-
|
|
7
|
+
appName,
|
|
9
8
|
secret
|
|
10
9
|
);
|
|
11
10
|
const qr = await QRCodesAdapter.generateQRCode(otpauth);
|
package/dist/types.d.mts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
import type { default as Module } from './module.mjs'
|
|
2
4
|
|
|
3
|
-
export
|
|
5
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
+
|
|
7
|
+
export { default } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "two-factor-authentification-tools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"description": "My new Nuxt module",
|
|
5
5
|
"repository": "your-org/my-module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"dev": "npm run dev:prepare && nuxt dev playground",
|
|
35
35
|
"dev:build": "nuxt build playground",
|
|
36
36
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
|
|
37
|
-
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
|
37
|
+
"release-default": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
|
38
|
+
"release": "npm run prepack && npm publish",
|
|
38
39
|
"lint": "eslint .",
|
|
39
40
|
"test": "vitest run",
|
|
40
41
|
"test:watch": "vitest watch",
|
|
File without changes
|
|
File without changes
|