@opencrvs/mosip 1.7.0-alpha.5 → 1.7.0-alpha.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.
package/build/forms.d.ts CHANGED
@@ -53,8 +53,10 @@ export declare const popupButton: ({ url }: {
53
53
  * @description esignet callback button form definition. Calls server/esignet-api /esignet/get-oidp-user-info (this field may not be supported in the latest release of OpenCRVS yet)
54
54
  *
55
55
  */
56
- export declare const esignetCallback: ({ fieldName, getOIDPUserInfoUrl, openIdProviderClientId }: {
56
+ export declare const esignetCallback: ({ fieldName, event, sectionId, getOIDPUserInfoUrl, openIdProviderClientId }: {
57
57
  fieldName: string;
58
+ event: string;
59
+ sectionId: string;
58
60
  getOIDPUserInfoUrl: string;
59
61
  openIdProviderClientId: string;
60
62
  }) => {
@@ -73,6 +75,7 @@ export declare const esignetCallback: ({ fieldName, getOIDPUserInfoUrl, openIdPr
73
75
  };
74
76
  body: {
75
77
  clientId: string;
78
+ redirectUri: string;
76
79
  };
77
80
  method: string;
78
81
  };
package/build/forms.js CHANGED
@@ -25,7 +25,7 @@ const esignet = (event, sectionId, esignetAuthUrl, openIdProviderClientId, openI
25
25
  url.searchParams.append('acr_values', 'mosip:idp:acr:static-code');
26
26
  url.searchParams.append('claims', openIdProviderClaims);
27
27
  url.searchParams.append('state', 'fetch-on-mount');
28
- url.searchParams.append('redirect_uri', `${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}`);
28
+ url.searchParams.append('redirect_uri', '${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}');
29
29
  return {
30
30
  name: fieldName,
31
31
  validator: [],
@@ -73,7 +73,7 @@ exports.popupButton = popupButton;
73
73
  * @description esignet callback button form definition. Calls server/esignet-api /esignet/get-oidp-user-info (this field may not be supported in the latest release of OpenCRVS yet)
74
74
  *
75
75
  */
76
- const esignetCallback = ({ fieldName, getOIDPUserInfoUrl, openIdProviderClientId }) => ({
76
+ const esignetCallback = ({ fieldName, event, sectionId, getOIDPUserInfoUrl, openIdProviderClientId }) => ({
77
77
  name: fieldName,
78
78
  type: 'HTTP',
79
79
  custom: true,
@@ -88,7 +88,8 @@ const esignetCallback = ({ fieldName, getOIDPUserInfoUrl, openIdProviderClientId
88
88
  'Content-type': 'application/json'
89
89
  },
90
90
  body: {
91
- clientId: openIdProviderClientId
91
+ clientId: openIdProviderClientId,
92
+ redirectUri: `${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}`
92
93
  },
93
94
  method: 'POST'
94
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/mosip",
3
- "version": "1.7.0-alpha.5",
3
+ "version": "1.7.0-alpha.7",
4
4
  "license": "MPL-2.0",
5
5
  "main": "./build/index.js",
6
6
  "exports": {
package/src/forms.ts CHANGED
@@ -38,7 +38,7 @@ export const esignet = (
38
38
  url.searchParams.append('state', 'fetch-on-mount');
39
39
  url.searchParams.append(
40
40
  'redirect_uri',
41
- `${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}`
41
+ '${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}'
42
42
  )
43
43
 
44
44
 
@@ -95,10 +95,14 @@ export const popupButton = ({
95
95
 
96
96
  export const esignetCallback = ({
97
97
  fieldName,
98
+ event,
99
+ sectionId,
98
100
  getOIDPUserInfoUrl,
99
101
  openIdProviderClientId
100
102
  }: {
101
103
  fieldName: string;
104
+ event: string;
105
+ sectionId: string;
102
106
  getOIDPUserInfoUrl: string;
103
107
  openIdProviderClientId: string;
104
108
  }) => ({
@@ -116,7 +120,8 @@ export const esignetCallback = ({
116
120
  'Content-type': 'application/json'
117
121
  },
118
122
  body: {
119
- clientId: openIdProviderClientId
123
+ clientId: openIdProviderClientId,
124
+ redirectUri: `${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}`
120
125
  },
121
126
 
122
127
  method: 'POST'