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

This commit is contained in:
_Bastler 2021-09-30 18:58:02 +02:00
commit 4d52ed4e9d
3 changed files with 10 additions and 9 deletions

View File

@ -4,7 +4,7 @@
local tag = namespace,
local url = namespace+".test.workadventu.re",
// develop branch does not use admin because of issue with SSL certificate of admin as of now.
local adminUrl = if namespace == "master" || namespace == "develop" || std.startsWith(namespace, "admin") then "https://"+url else null,
local adminUrl = if std.startsWith(namespace, "admin") then "https://"+url else null,
"$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json",
"version": "1.0",
"containers": {
@ -17,7 +17,6 @@
"ports": [8080, 50051],
"env": {
"SECRET_KEY": "tempSecretKeyNeedsToChange",
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
"JITSI_ISS": env.JITSI_ISS,
"JITSI_URL": env.JITSI_URL,
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
@ -25,6 +24,7 @@
"REDIS_HOST": "redis",
} + (if adminUrl != null then {
"ADMIN_API_URL": adminUrl,
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
} else {})
},
"back2": {
@ -36,7 +36,6 @@
"ports": [8080, 50051],
"env": {
"SECRET_KEY": "tempSecretKeyNeedsToChange",
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
"JITSI_ISS": env.JITSI_ISS,
"JITSI_URL": env.JITSI_URL,
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
@ -44,6 +43,7 @@
"REDIS_HOST": "redis",
} + (if adminUrl != null then {
"ADMIN_API_URL": adminUrl,
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
} else {})
},
"pusher": {
@ -55,13 +55,13 @@
"ports": [8080],
"env": {
"SECRET_KEY": "tempSecretKeyNeedsToChange",
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
"JITSI_ISS": env.JITSI_ISS,
"JITSI_URL": env.JITSI_URL,
"API_URL": "back1:50051,back2:50051",
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
} + (if adminUrl != null then {
"ADMIN_API_URL": adminUrl,
"ADMIN_API_TOKEN": env.ADMIN_API_TOKEN,
} else {})
},
"front": {
@ -81,8 +81,7 @@
"SECRET_JITSI_KEY": env.SECRET_JITSI_KEY,
"TURN_SERVER": "turn:coturn.workadventu.re:443,turns:coturn.workadventu.re:443",
"JITSI_PRIVATE_MODE": if env.SECRET_JITSI_KEY != '' then "true" else "false",
"START_ROOM_URL": "/_/global/maps-"+url+"/Floor0/floor0.json"
//"GA_TRACKING_ID": "UA-10196481-11"
"START_ROOM_URL": "/_/global/maps-"+url+"/starter/map.json"
}
},
"uploader": {

View File

@ -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);

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,
});
});
}