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;
|
||||
|
||||
// } else if (uid) {
|
||||
const bytes = CryptoJS.AES.decrypt(uid, secretKey);
|
||||
const decrypted = bytes.toString(CryptoJS.enc.Utf8);
|
||||
const username = decrypted;
|
||||
// }
|
||||
let username = "";
|
||||
if (req.body.serve === 'sso') {
|
||||
const bytes = CryptoJS.AES.decrypt(uid, secretKey);
|
||||
const decrypted = bytes.toString(CryptoJS.enc.Utf8);
|
||||
username = decrypted;
|
||||
} else {
|
||||
username = uid;
|
||||
}
|
||||
|
||||
// const oldssotoken = cookies['oldssotoken'];
|
||||
const olduid = cookies['olduid'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue