Manage redirect URL from admin and save in hydra via pusher (#1492)

Add redirect parameter url to connect user directly on private openId application

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
This commit is contained in:
grégoire parant 2021-09-30 11:16:25 +02:00 committed by GitHub
parent 4650f4e8cf
commit 1e69bb0f49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View file

@ -28,7 +28,7 @@ export class AuthenticateController extends BaseController {
});
try {
const { nonce, state, playUri } = parse(req.getQuery());
const { nonce, state, playUri, redirect } = parse(req.getQuery());
if (!state || !nonce) {
throw "missing state and nonce URL parameters";
}
@ -36,7 +36,8 @@ export class AuthenticateController extends BaseController {
const loginUri = await openIDClient.authorizationUrl(
state as string,
nonce as string,
playUri as string | undefined
playUri as string | undefined,
redirect as string | undefined
);
res.writeStatus("302");
res.writeHeader("Location", loginUri);