@criipto/verify-react 1.1.5 → 1.1.7

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,5 +1,5 @@
1
1
  import React from 'react';
2
- import { PKCEPublicPart, Prompt } from '@criipto/auth-js';
2
+ import { AuthorizeUrlParamsOptional, PKCEPublicPart, Prompt } from '@criipto/auth-js';
3
3
  import { Action } from './context';
4
4
  export interface CriiptoVerifyProviderOptions {
5
5
  domain: string;
@@ -47,5 +47,10 @@ export interface CriiptoVerifyProviderOptions {
47
47
  }
48
48
  export declare const ACTION_SUPPORTING_ACR_VALUES: string[];
49
49
  export declare const MESSAGE_SUPPORTING_ACR_VALUES: string[];
50
+ export declare function buildLoginHint(loginHint: string | undefined | null, params: {
51
+ options?: AuthorizeUrlParamsOptional;
52
+ action?: Action;
53
+ message?: string;
54
+ }): string | undefined;
50
55
  declare const CriiptoVerifyProvider: (props: CriiptoVerifyProviderOptions) => JSX.Element;
51
56
  export default CriiptoVerifyProvider;
package/jest.config.ts CHANGED
@@ -60,7 +60,7 @@ export default {
60
60
  // forceCoverageMatch: [],
61
61
 
62
62
  // A path to a module which exports an async function that is triggered once before all test suites
63
- globalSetup: './jest.setup.ts',
63
+ //globalSetup: './jest.setup.ts',
64
64
 
65
65
  // A path to a module which exports an async function that is triggered once after all test suites
66
66
  // globalTeardown: undefined,
@@ -133,7 +133,9 @@ export default {
133
133
  // runner: "jest-runner",
134
134
 
135
135
  // The paths to modules that run some code to configure or set up the testing environment before each test
136
- // setupFiles: [],
136
+ setupFiles: [
137
+ './jest.setup.ts'
138
+ ],
137
139
 
138
140
  // A list of paths to modules that run some code to configure or set up the testing framework before each test
139
141
  // setupFilesAfterEnv: [],
package/jest.setup.ts CHANGED
@@ -1,3 +1,12 @@
1
- export default async function () {
2
-
3
- }
1
+ import webcrypto from 'node:crypto';
2
+
3
+ Object.defineProperty(globalThis, "crypto", {
4
+ value: webcrypto
5
+ });
6
+
7
+ if (!("getRandomValues" in webcrypto)) {
8
+ (webcrypto as any).getRandomValues = (arr: Uint8Array) => {
9
+ const bytes = require('crypto').randomBytes(arr.length)
10
+ arr.fill(bytes);
11
+ }
12
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@criipto/verify-react",
3
3
  "private": false,
4
- "version": "1.1.5",
4
+ "version": "1.1.7",
5
5
  "description": "Verify SDK for React Single Page Applications",
6
6
  "main": "dist/criipto-verify-react.cjs.js",
7
7
  "types": "dist/index.d.ts",
@@ -69,7 +69,7 @@
69
69
  },
70
70
  "homepage": "https://github.com/criipto/criipto-verify-react#readme",
71
71
  "dependencies": {
72
- "@criipto/auth-js": "^3.6.2",
72
+ "@criipto/auth-js": "^3.6.7",
73
73
  "jwt-decode": "^3.1.2",
74
74
  "ua-parser-js": "^1.0.34"
75
75
  }