Only incuding state when was given
This commit is contained in:
parent
21f4e741f2
commit
7071e64f6d
@ -97,7 +97,7 @@ const GetAuthRoute = (view = false) =>
|
||||
} = req.query;
|
||||
const sendError = type => {
|
||||
if (redirect_uri === "$local") redirect_uri = "/code";
|
||||
res.redirect((redirect_uri += `?error=${type}&state=${state}`));
|
||||
res.redirect((redirect_uri += `?error=${type}${state ? "&state=" + state : ""}`));
|
||||
};
|
||||
|
||||
const scopes = scope.split(";");
|
||||
@ -228,7 +228,7 @@ const GetAuthRoute = (view = false) =>
|
||||
|
||||
let redir =
|
||||
client.redirect_url === "$local" ? "/code" : client.redirect_url;
|
||||
let ruri = redir + `?code=${code.code}&state=${state}`;
|
||||
let ruri = redir + `?code=${code.code}${state ? "&state=" + state : ""}`;
|
||||
if (nored === "true") {
|
||||
res.json({
|
||||
redirect_uri: ruri
|
||||
|
Loading…
Reference in New Issue
Block a user