@nauth-toolkit/mfa-sms 0.2.0 → 0.2.2
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/README.md +52 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,4 +4,55 @@ SMS one-time code MFA provider for [nauth-toolkit](https://nauth.dev).
|
|
|
4
4
|
|
|
5
5
|
Sends verification codes via SMS for multi-factor authentication. Requires an SMS provider (`@nauth-toolkit/sms-aws-sns` or `@nauth-toolkit/sms-console` for development).
|
|
6
6
|
|
|
7
|
-
**
|
|
7
|
+
**[Documentation](https://nauth.dev/docs/guides/mfa/how-mfa-works)** · **[GitHub](https://github.com/noorixorg/nauth)**
|
|
8
|
+
|
|
9
|
+
> Part of [nauth-toolkit](https://www.npmjs.com/package/@nauth-toolkit/core). Requires `@nauth-toolkit/core` and an SMS provider.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @nauth-toolkit/mfa-sms @nauth-toolkit/sms-console
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Enable in your auth config:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { MFAMethod } from '@nauth-toolkit/core';
|
|
23
|
+
|
|
24
|
+
const authConfig = {
|
|
25
|
+
mfa: {
|
|
26
|
+
enabled: true,
|
|
27
|
+
allowedMethods: [MFAMethod.SMS],
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**NestJS** — import the module and it auto-registers:
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { SMSMFAModule } from '@nauth-toolkit/mfa-sms/nestjs';
|
|
36
|
+
|
|
37
|
+
@Module({
|
|
38
|
+
imports: [NAuthModule.forRoot(authConfig), SMSMFAModule],
|
|
39
|
+
})
|
|
40
|
+
export class AuthModule {}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Related packages
|
|
46
|
+
|
|
47
|
+
| Package | Purpose |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| [`@nauth-toolkit/sms-aws-sns`](https://www.npmjs.com/package/@nauth-toolkit/sms-aws-sns) | AWS SNS — production SMS delivery |
|
|
50
|
+
| [`@nauth-toolkit/sms-console`](https://www.npmjs.com/package/@nauth-toolkit/sms-console) | Console logging — development use |
|
|
51
|
+
| [`@nauth-toolkit/mfa-totp`](https://www.npmjs.com/package/@nauth-toolkit/mfa-totp) | TOTP authenticator apps |
|
|
52
|
+
| [`@nauth-toolkit/mfa-email`](https://www.npmjs.com/package/@nauth-toolkit/mfa-email) | Email verification codes |
|
|
53
|
+
|
|
54
|
+
See the [full package list](https://www.npmjs.com/package/@nauth-toolkit/core#package-ecosystem) in the core README.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
Free to use. See [license](https://nauth.dev/docs/license).
|