Merge branch 'develop' of github.com:thecodingmachine/workadventure

This commit is contained in:
_Bastler
2021-09-30 18:58:02 +02:00
3 changed files with 10 additions and 9 deletions
@@ -31,7 +31,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";
}
@@ -39,7 +39,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);
+2 -1
View File
@@ -20,7 +20,7 @@ class OpenIDClient {
return this.issuerPromise;
}
public authorizationUrl(state: string, nonce: string, playUri?: string) {
public authorizationUrl(state: string, nonce: string, playUri?: string, redirect?: string) {
return this.initClient().then((client) => {
return client.authorizationUrl({
scope: "openid email",
@@ -28,6 +28,7 @@ class OpenIDClient {
state: state,
nonce: nonce,
playUri: playUri,
redirect: redirect,
});
});
}