@nauth-toolkit/client-angular 0.1.92 → 0.1.94

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.
@@ -0,0 +1,27 @@
1
+ import { EnvironmentProviders } from '@angular/core';
2
+ import { RecaptchaServiceConfig } from './recaptcha.service';
3
+ /**
4
+ * Provides reCAPTCHA configuration and automatic script preloading.
5
+ *
6
+ * Sets up `RECAPTCHA_CONFIG` and forces `RecaptchaService` instantiation at app
7
+ * startup so the reCAPTCHA script preloads before the user clicks login/signup.
8
+ *
9
+ * @param config - reCAPTCHA configuration (enabled, version, siteKey, action)
10
+ * @returns Environment providers for reCAPTCHA
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * export const appConfig: ApplicationConfig = {
15
+ * providers: [
16
+ * provideRecaptcha({
17
+ * enabled: true,
18
+ * version: 'enterprise',
19
+ * siteKey: environment.recaptchaSiteKey,
20
+ * action: 'login',
21
+ * }),
22
+ * // ... other providers
23
+ * ],
24
+ * };
25
+ * ```
26
+ */
27
+ export declare function provideRecaptcha(config: RecaptchaServiceConfig): EnvironmentProviders;
@@ -1,5 +1,5 @@
1
1
  import { ModuleWithProviders } from '@angular/core';
2
- import { NAuthClientConfig } from '@nauth-toolkit/client';
2
+ import { NAuthAngularConfig } from './tokens';
3
3
  import * as i0 from "@angular/core";
4
4
  import * as i1 from "@angular/common/http";
5
5
  /**
@@ -7,7 +7,7 @@ import * as i1 from "@angular/common/http";
7
7
  *
8
8
  * Use this for NgModule-based apps (Angular 17+ with NgModule or legacy apps).
9
9
  *
10
- * @example
10
+ * @example Basic Setup
11
11
  * ```typescript
12
12
  * // app.module.ts
13
13
  * import { NAuthModule } from '@nauth-toolkit/client-angular';
@@ -22,9 +22,23 @@ import * as i1 from "@angular/common/http";
22
22
  * })
23
23
  * export class AppModule {}
24
24
  * ```
25
+ *
26
+ * @example With reCAPTCHA Enterprise
27
+ * ```typescript
28
+ * NAuthModule.forRoot({
29
+ * baseUrl: 'http://localhost:3000/auth',
30
+ * tokenDelivery: 'cookies',
31
+ * recaptcha: {
32
+ * enabled: true,
33
+ * version: 'enterprise',
34
+ * siteKey: environment.recaptchaSiteKey,
35
+ * action: 'login',
36
+ * },
37
+ * })
38
+ * ```
25
39
  */
26
40
  export declare class NAuthModule {
27
- static forRoot(config: NAuthClientConfig): ModuleWithProviders<NAuthModule>;
41
+ static forRoot(config: NAuthAngularConfig): ModuleWithProviders<NAuthModule>;
28
42
  static ɵfac: i0.ɵɵFactoryDeclaration<NAuthModule, never>;
29
43
  static ɵmod: i0.ɵɵNgModuleDeclaration<NAuthModule, never, [typeof i1.HttpClientModule], [typeof i1.HttpClientModule]>;
30
44
  static ɵinj: i0.ɵɵInjectorDeclaration<NAuthModule>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nauth-toolkit/client-angular",
3
- "version": "0.1.92",
3
+ "version": "0.1.94",
4
4
  "description": "Angular adapter for nauth-toolkit client SDK",
5
5
  "keywords": [
6
6
  "nauth",
@@ -24,7 +24,7 @@
24
24
  "peerDependencies": {
25
25
  "@angular/common": ">=17.0.0",
26
26
  "@angular/core": ">=17.0.0",
27
- "@nauth-toolkit/client": "^0.1.92",
27
+ "@nauth-toolkit/client": "^0.1.94",
28
28
  "rxjs": "^7.0.0 || ^8.0.0"
29
29
  },
30
30
  "dependencies": {
package/public-api.d.ts CHANGED
@@ -14,3 +14,4 @@ export * from './lib/auth.interceptor';
14
14
  export * from './lib/auth.guard';
15
15
  export * from './lib/social-redirect-callback.guard';
16
16
  export * from './lib/recaptcha.service';
17
+ export * from './lib/recaptcha-provider';