@opencrvs/mosip 1.7.0-alpha.7 → 1.7.0-alpha.8
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.js +2 -2
- package/package.json +1 -1
- package/src/forms.ts +5 -5
package/build/forms.js
CHANGED
|
@@ -17,7 +17,7 @@ exports.idVerificationFields = exports.idPendingVerificationBanner = exports.ver
|
|
|
17
17
|
* @description E-Signet REDIRECT button form definition. Calls E-Signet /authorize (this field may not be supported in the latest release of OpenCRVS yet)
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
|
-
const esignet = (event, sectionId, esignetAuthUrl, openIdProviderClientId, openIdProviderClaims =
|
|
20
|
+
const esignet = (event, sectionId, esignetAuthUrl, openIdProviderClientId, openIdProviderClaims = 'name,family_name,given_name,middle_name,birthdate,address', fieldName, callbackFieldName) => {
|
|
21
21
|
const url = new URL(esignetAuthUrl);
|
|
22
22
|
url.searchParams.append('client_id', openIdProviderClientId || 'mock-client_id');
|
|
23
23
|
url.searchParams.append('response_type', 'code');
|
|
@@ -89,7 +89,7 @@ const esignetCallback = ({ fieldName, event, sectionId, getOIDPUserInfoUrl, open
|
|
|
89
89
|
},
|
|
90
90
|
body: {
|
|
91
91
|
clientId: openIdProviderClientId,
|
|
92
|
-
redirectUri:
|
|
92
|
+
redirectUri: '${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}'
|
|
93
93
|
},
|
|
94
94
|
method: 'POST'
|
|
95
95
|
}
|
package/package.json
CHANGED
package/src/forms.ts
CHANGED
|
@@ -21,7 +21,7 @@ export const esignet = (
|
|
|
21
21
|
sectionId: string,
|
|
22
22
|
esignetAuthUrl: string,
|
|
23
23
|
openIdProviderClientId: string,
|
|
24
|
-
openIdProviderClaims: string =
|
|
24
|
+
openIdProviderClaims: string = 'name,family_name,given_name,middle_name,birthdate,address',
|
|
25
25
|
fieldName: string,
|
|
26
26
|
callbackFieldName: string
|
|
27
27
|
) => {
|
|
@@ -39,8 +39,7 @@ export const esignet = (
|
|
|
39
39
|
url.searchParams.append(
|
|
40
40
|
'redirect_uri',
|
|
41
41
|
'${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}'
|
|
42
|
-
)
|
|
43
|
-
|
|
42
|
+
);
|
|
44
43
|
|
|
45
44
|
return {
|
|
46
45
|
name: fieldName,
|
|
@@ -121,9 +120,10 @@ export const esignetCallback = ({
|
|
|
121
120
|
},
|
|
122
121
|
body: {
|
|
123
122
|
clientId: openIdProviderClientId,
|
|
124
|
-
redirectUri:
|
|
123
|
+
redirectUri:
|
|
124
|
+
'${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}'
|
|
125
125
|
},
|
|
126
|
-
|
|
126
|
+
|
|
127
127
|
method: 'POST'
|
|
128
128
|
}
|
|
129
129
|
});
|