w-web-sso 1.0.2 → 1.0.4

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.
package/docs/WWebSso.html CHANGED
@@ -925,7 +925,7 @@
925
925
  <br class="clear">
926
926
 
927
927
  <footer>
928
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Apr 15 2024 22:15:58 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
928
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Apr 16 2024 16:49:31 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
929
929
  </footer>
930
930
 
931
931
  <script>prettyPrint();</script>
@@ -767,7 +767,7 @@ export default WWebSso
767
767
  <br class="clear">
768
768
 
769
769
  <footer>
770
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Apr 15 2024 22:15:58 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
770
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Apr 16 2024 16:49:31 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
771
771
  </footer>
772
772
 
773
773
  <script>prettyPrint();</script>
package/docs/index.html CHANGED
@@ -71,7 +71,7 @@
71
71
  <br class="clear">
72
72
 
73
73
  <footer>
74
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Apr 15 2024 22:15:58 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
74
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Tue Apr 16 2024 16:49:31 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
75
75
  </footer>
76
76
 
77
77
  <script>prettyPrint();</script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-web-sso",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "main": "dist/w-web-sso.umd.js",
5
5
  "dependencies": {
6
6
  "@mdi/js": "^7.4.47",
package/server/proc.mjs CHANGED
@@ -114,6 +114,7 @@ function proc(woItems, { salt, timeExpired }) {
114
114
 
115
115
  //r
116
116
  let r = {
117
+ id: u.id,
117
118
  account: u.account,
118
119
  name: u.name,
119
120
  email: u.email,
@@ -367,6 +368,7 @@ function proc(woItems, { salt, timeExpired }) {
367
368
 
368
369
  //r
369
370
  let r = {
371
+ id: u.id,
370
372
  account: u.account,
371
373
  name: u.name,
372
374
  email: u.email,
@@ -415,17 +417,26 @@ function proc(woItems, { salt, timeExpired }) {
415
417
  // console.log('userId', userId)
416
418
 
417
419
  //del
418
- await woItems.tokens.del({ token })
420
+ let r = await woItems.tokens.del({ id: tk.id })
419
421
  .catch((err) => {
420
422
  errTemp = err
421
423
  })
424
+ // console.log('r', r)
422
425
 
423
426
  //check
424
427
  if (errTemp) {
425
428
  console.log(errTemp)
426
429
  console.log(`token`, token)
427
- console.log(`Failed to delete key`)
428
- return Promise.reject(`Failed to delete key`)
430
+ console.log(`Failed to delete token`)
431
+ return Promise.reject(`Failed to delete token`)
432
+ }
433
+
434
+ //check
435
+ r = get(r, '0.nDeleted', 0)
436
+ if (r !== 1) {
437
+ console.log(`token`, token)
438
+ console.log(`Can not delete the token`)
439
+ return Promise.reject(`Can not delete the token`)
429
440
  }
430
441
 
431
442
  //bbb 待加入創建usersRecs儲存使用者登出紀錄
@@ -467,7 +478,7 @@ function proc(woItems, { salt, timeExpired }) {
467
478
  await pmSeries(tks, async (tk) => {
468
479
 
469
480
  //del
470
- await woItems.tokens.del({ token: tk.token })
481
+ await woItems.tokens.del({ id: tk.id })
471
482
  .catch(() => { })
472
483
 
473
484
  //bbb 待加入創建usersRecs儲存使用者登出紀錄
@@ -483,31 +494,31 @@ function proc(woItems, { salt, timeExpired }) {
483
494
 
484
495
  //createUser
485
496
  let createUser = async () => {
486
- //bbb
497
+ //bbb 待開發createUser
487
498
  }
488
499
 
489
500
 
490
501
  //ModifyUser
491
502
  let ModifyUser = async () => {
492
- //bbb
503
+ //bbb 待開發ModifyUser
493
504
  }
494
505
 
495
506
 
496
507
  //DeleteUser
497
508
  let DeleteUser = async () => {
498
- //bbb
509
+ //bbb 待開發DeleteUser
499
510
  }
500
511
 
501
512
 
502
513
  //AuthUser
503
514
  let AuthUser = async () => {
504
- //bbb
515
+ //bbb 待開發AuthUser
505
516
  }
506
517
 
507
518
 
508
519
  //EmailUser
509
520
  let EmailUser = async () => {
510
- //bbb
521
+ //bbb 待開發 EmailUser
511
522
  }
512
523
 
513
524
 
@@ -546,6 +557,7 @@ function proc(woItems, { salt, timeExpired }) {
546
557
 
547
558
  //r
548
559
  let r = {
560
+ id: u.id,
549
561
  account: u.account,
550
562
  name: u.name,
551
563
  email: u.email,
@@ -339,10 +339,10 @@ export default {
339
339
 
340
340
  //href
341
341
  // if (isDev()) {
342
- // console.log('60s後重導至:', url)
342
+ // console.log('10s後重導至:', url)
343
343
  // setTimeout(() => {
344
344
  // window.location.href = url
345
- // }, 60 * 1000)
345
+ // }, 10 * 1000)
346
346
  // }
347
347
  // else {
348
348
  // window.location.href = url