Skip to content

Commit c7f5234

Browse files
committed
add a mock fix for redirect-uris
1 parent 80b7f81 commit c7f5234

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/esignet-mock/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,9 @@ app.get("/authorize", {
194194
.replace(/{{state}}/g, request.query.state)
195195
.replace(/{{redirect_uri}}/g, request.query.redirect_uri);
196196

197+
/** See `packages/mosip-api/src/esignet-api.ts` for `redirect_uri: redirectUri?.split("?")[0] ?? redirectUri` to understand the matching of this */
197198
/** @see VALID_REDIRECT_URIS for explanation */
198-
VALID_REDIRECT_URIS.push(request.query.redirect_uri);
199+
VALID_REDIRECT_URIS.push(request.query.redirect_uri.split("?")[0]);
199200

200201
return reply.type("text/html").send(modifiedHtml);
201202
},

0 commit comments

Comments
 (0)