aloux-iam 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,6 +78,7 @@ const adminSchema = mongoose.Schema({
78
78
  tokens: [
79
79
  {
80
80
  token: { type: String, required: true },
81
+ displayToken: { type: String },
81
82
  date: { type: Number },
82
83
  dateEnd: { type: Number },
83
84
  type: { type: String, enum: ["session", "api"], default: "session" },
@@ -23,7 +23,7 @@ self.searchEmail = async (email, banCode) => {
23
23
  if (banCode?.toString() === "true") {
24
24
  code = await self.generatecode();
25
25
  await self.sendcodemailLogin(userLogin.email, code, false);
26
- userLogin.validateKey.resetPassword.resetCode = code;
26
+ userLogin.validateKey.resetPassword.resetCode = hashCode(code);
27
27
  let time = new Date();
28
28
  const sumarMinutos = new Date(time.getTime() + 5 * 60000);
29
29
  userLogin.validateKey.limitCodeTime = new Date(sumarMinutos).getTime();
@@ -73,6 +73,7 @@ self.createServiceAccount = async (body) => {
73
73
  : Number.MAX_SAFE_INTEGER
74
74
  user.tokens = [{
75
75
  token: hashToken(rawToken),
76
+ displayToken: rawToken,
76
77
  date: new Date().getTime(),
77
78
  dateEnd,
78
79
  type: 'api'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aloux-iam",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Aloux IAM for APIs ",
5
5
  "main": "index.js",
6
6
  "scripts": {