Skip to content

Commit 8630ef9

Browse files
fix/redirect uri (#42)
* fix: esignet field `redirect_uri` * chore: bump package version * Remove unused params and apply change to callback --------- Co-authored-by: euanmillar <euanmillar77@gmail.com>
1 parent da45f8b commit 8630ef9

File tree

6 files changed

+11
-15
lines changed

6 files changed

+11
-15
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencrvs/mosip",
3-
"version": "1.7.0-alpha.11",
3+
"version": "1.7.0-alpha.12",
44
"license": "MPL-2.0",
55
"private": true,
66
"packageManager": "yarn@1.22.13",

packages/country-config/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencrvs/mosip",
3-
"version": "1.7.0-alpha.11",
3+
"version": "1.7.0-alpha.12",
44
"license": "MPL-2.0",
55
"main": "./build/index.js",
66
"exports": {

packages/country-config/src/forms.ts

+6-10
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
*
1818
*/
1919
export const esignet = (
20-
event: string,
21-
sectionId: string,
2220
esignetAuthUrl: string,
2321
openIdProviderClientId: string,
2422
openIdProviderClaims: string = "name,family_name,given_name,middle_name,birthdate,address",
@@ -38,7 +36,7 @@ export const esignet = (
3836
url.searchParams.append("state", "fetch-on-mount");
3937
url.searchParams.append(
4038
"redirect_uri",
41-
'${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}',
39+
'${window.location.href}',
4240
);
4341

4442
return {
@@ -88,21 +86,19 @@ export const popupButton = ({
8886

8987
/**
9088
*
91-
* @description esignet callback button form definition. Calls mosip-api/esignet-api /esignet/get-oidp-user-info (this field may not be supported in the latest release of OpenCRVS yet)
89+
* @description esignet callback button form definition. Calls https://mosip-api.{{hostname}}/esignet/get-oidp-user-info
9290
*
9391
*/
9492

9593
export const esignetCallback = ({
9694
fieldName,
97-
event,
98-
sectionId,
99-
getOIDPUserInfoUrl,
95+
mosipAPIUserInfoUrl,
10096
openIdProviderClientId,
10197
}: {
10298
fieldName: string;
10399
event: string;
104100
sectionId: string;
105-
getOIDPUserInfoUrl: string;
101+
mosipAPIUserInfoUrl: string;
106102
openIdProviderClientId: string;
107103
}) => ({
108104
name: fieldName,
@@ -115,14 +111,14 @@ export const esignetCallback = ({
115111
validator: [],
116112
hideInPreview: true,
117113
options: {
118-
url: getOIDPUserInfoUrl,
114+
url: mosipAPIUserInfoUrl,
119115
headers: {
120116
"Content-type": "application/json",
121117
},
122118
body: {
123119
clientId: openIdProviderClientId,
124120
redirectUri:
125-
'${window.location.origin}/drafts/${window.location.pathname.split("/")[2]}/events/${event}/${sectionId}/group/${sectionId}',
121+
'${window.location.href}',
126122
},
127123

128124
method: "POST",

packages/esignet-mock/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@opencrvs/esignet-mock",
33
"license": "MPL-2.0",
4-
"version": "1.7.0-alpha.11",
4+
"version": "1.7.0-alpha.12",
55
"main": "index.js",
66
"scripts": {
77
"dev": "NODE_ENV=development tsx watch src/index.ts",

packages/mosip-api/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencrvs/mosip-api",
3-
"version": "1.7.0-alpha.11",
3+
"version": "1.7.0-alpha.12",
44
"license": "MPL-2.0",
55
"scripts": {
66
"dev": "NODE_ENV=development tsx watch src/index.ts",

packages/mosip-mock/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencrvs/mosip-mock",
3-
"version": "1.7.0-alpha.11",
3+
"version": "1.7.0-alpha.12",
44
"license": "MPL-2.0",
55
"scripts": {
66
"dev": "NODE_ENV=development tsx watch src/index.ts",

0 commit comments

Comments
 (0)