fixing
This commit is contained in:
parent
42184cb442
commit
cecb85d066
1 changed files with 8 additions and 4 deletions
12
sso.js
12
sso.js
|
|
@ -107,10 +107,14 @@ app.post("/api/v1/sso/kcauth", async (req, res) => {
|
||||||
// username = d.username;
|
// username = d.username;
|
||||||
|
|
||||||
// } else if (uid) {
|
// } else if (uid) {
|
||||||
const bytes = CryptoJS.AES.decrypt(uid, secretKey);
|
let username = "";
|
||||||
const decrypted = bytes.toString(CryptoJS.enc.Utf8);
|
if (req.body.serve === 'sso') {
|
||||||
const username = decrypted;
|
const bytes = CryptoJS.AES.decrypt(uid, secretKey);
|
||||||
// }
|
const decrypted = bytes.toString(CryptoJS.enc.Utf8);
|
||||||
|
username = decrypted;
|
||||||
|
} else {
|
||||||
|
username = uid;
|
||||||
|
}
|
||||||
|
|
||||||
// const oldssotoken = cookies['oldssotoken'];
|
// const oldssotoken = cookies['oldssotoken'];
|
||||||
const olduid = cookies['olduid'];
|
const olduid = cookies['olduid'];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue