Merge branch 'develop' of github.com:thecodingmachine/workadventure
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user