@junobuild/core 0.0.47 → 0.0.48

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.
@@ -1,4 +1,5 @@
1
1
  export declare const DELEGATION_IDENTITY_EXPIRATION: bigint;
2
+ export declare const ALLOW_PIN_AUTHENTICATION = false;
2
3
  export declare const II_POPUP: {
3
4
  width: number;
4
5
  height: number;
@@ -1,31 +1,21 @@
1
- import type { Provider, SignInOptions } from '../types/auth.types';
1
+ import type { InternetIdentityConfig, NFIDConfig, Provider, SignInOptions } from '../types/auth.types';
2
+ export interface AuthProviderSignInOptions {
3
+ identityProvider: string;
4
+ windowOpenerFeatures?: string;
5
+ }
2
6
  export interface AuthProvider {
3
7
  readonly id: Provider;
4
- signInOptions: (options: Pick<SignInOptions, 'windowed'>) => {
5
- identityProvider: string;
6
- windowOpenerFeatures?: string;
7
- };
8
+ signInOptions: (options: Pick<SignInOptions, 'windowed'>) => AuthProviderSignInOptions;
8
9
  }
9
10
  export declare class InternetIdentityProvider implements AuthProvider {
10
11
  #private;
11
- constructor({ domain }: {
12
- domain?: 'internetcomputer.org' | 'ic0.app';
13
- });
12
+ constructor({ domain }: InternetIdentityConfig);
14
13
  get id(): Provider;
15
- signInOptions({ windowed }: Pick<SignInOptions, 'windowed'>): {
16
- identityProvider: string;
17
- windowOpenerFeatures?: string;
18
- };
14
+ signInOptions({ windowed }: Pick<SignInOptions, 'windowed'>): AuthProviderSignInOptions;
19
15
  }
20
16
  export declare class NFIDProvider implements AuthProvider {
21
17
  #private;
22
- constructor({ appName, logoUrl }: {
23
- appName: string;
24
- logoUrl: string;
25
- });
18
+ constructor({ appName, logoUrl }: NFIDConfig);
26
19
  get id(): Provider;
27
- signInOptions({ windowed }: Pick<SignInOptions, 'windowed'>): {
28
- identityProvider: string;
29
- windowOpenerFeatures?: string;
30
- };
20
+ signInOptions({ windowed }: Pick<SignInOptions, 'windowed'>): AuthProviderSignInOptions;
31
21
  }
@@ -9,5 +9,14 @@ export interface SignInOptions {
9
9
  maxTimeToLive?: bigint;
10
10
  derivationOrigin?: string | URL;
11
11
  windowed?: boolean;
12
+ allowPin?: boolean;
12
13
  provider?: InternetIdentityProvider | NFIDProvider;
13
14
  }
15
+ export type InternetIdentityDomain = 'internetcomputer.org' | 'ic0.app';
16
+ export interface InternetIdentityConfig {
17
+ domain?: InternetIdentityDomain;
18
+ }
19
+ export interface NFIDConfig {
20
+ appName: string;
21
+ logoUrl: string;
22
+ }