@idea-ionic/auth 7.2.17 → 7.3.0

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.
@@ -9,12 +9,1015 @@ import { IonicModule } from '@ionic/angular';
9
9
  import * as i2$1 from '@angular/router';
10
10
  import { RouterModule } from '@angular/router';
11
11
  import * as i2 from '@idea-ionic/common';
12
- import { IDEAEnvironment, IDEATranslationsModule } from '@idea-ionic/common';
12
+ import { IDEAEnvironment, IDEATranslationsService, IDEATranslationsModule } from '@idea-ionic/common';
13
13
  import { Browser } from '@capacitor/browser';
14
14
  import { CognitoUserPool, AuthenticationDetails, CognitoUser, CognitoUserAttribute, CognitoRefreshToken } from 'amazon-cognito-identity-js';
15
15
  import { isEmpty } from 'idea-toolbox';
16
16
  import { toCanvas } from 'qrcode';
17
17
 
18
+ const COMMON_PASSWORDS_TOP_1000 = [
19
+ '123456',
20
+ 'password',
21
+ '12345678',
22
+ 'qwerty',
23
+ '123456789',
24
+ '12345',
25
+ '1234',
26
+ '111111',
27
+ '1234567',
28
+ 'dragon',
29
+ '123123',
30
+ 'baseball',
31
+ 'abc123',
32
+ 'football',
33
+ 'monkey',
34
+ 'letmein',
35
+ '696969',
36
+ 'shadow',
37
+ 'master',
38
+ '666666',
39
+ 'qwertyuiop',
40
+ '123321',
41
+ 'mustang',
42
+ '1234567890',
43
+ 'michael',
44
+ '654321',
45
+ 'pussy',
46
+ 'superman',
47
+ '1qaz2wsx',
48
+ '7777777',
49
+ 'fuckyou',
50
+ '121212',
51
+ '000000',
52
+ 'qazwsx',
53
+ '123qwe',
54
+ 'killer',
55
+ 'trustno1',
56
+ 'jordan',
57
+ 'jennifer',
58
+ 'zxcvbnm',
59
+ 'asdfgh',
60
+ 'hunter',
61
+ 'buster',
62
+ 'soccer',
63
+ 'harley',
64
+ 'batman',
65
+ 'andrew',
66
+ 'tigger',
67
+ 'sunshine',
68
+ 'iloveyou',
69
+ 'fuckme',
70
+ '2000',
71
+ 'charlie',
72
+ 'robert',
73
+ 'thomas',
74
+ 'hockey',
75
+ 'ranger',
76
+ 'daniel',
77
+ 'starwars',
78
+ 'klaster',
79
+ '112233',
80
+ 'george',
81
+ 'asshole',
82
+ 'computer',
83
+ 'michelle',
84
+ 'jessica',
85
+ 'pepper',
86
+ '1111',
87
+ 'zxcvbn',
88
+ '555555',
89
+ '11111111',
90
+ '131313',
91
+ 'freedom',
92
+ '777777',
93
+ 'pass',
94
+ 'fuck',
95
+ 'maggie',
96
+ '159753',
97
+ 'aaaaaa',
98
+ 'ginger',
99
+ 'princess',
100
+ 'joshua',
101
+ 'cheese',
102
+ 'amanda',
103
+ 'summer',
104
+ 'love',
105
+ 'ashley',
106
+ '6969',
107
+ 'nicole',
108
+ 'chelsea',
109
+ 'biteme',
110
+ 'matthew',
111
+ 'access',
112
+ 'yankees',
113
+ '987654321',
114
+ 'dallas',
115
+ 'austin',
116
+ 'thunder',
117
+ 'taylor',
118
+ 'matrix',
119
+ 'william',
120
+ 'corvette',
121
+ 'hello',
122
+ 'martin',
123
+ 'heather',
124
+ 'secret',
125
+ 'fucker',
126
+ 'merlin',
127
+ 'diamond',
128
+ '1234qwer',
129
+ 'gfhjkm',
130
+ 'hammer',
131
+ 'silver',
132
+ '222222',
133
+ '88888888',
134
+ 'anthony',
135
+ 'justin',
136
+ 'test',
137
+ 'bailey',
138
+ 'q1w2e3r4t5',
139
+ 'patrick',
140
+ 'internet',
141
+ 'scooter',
142
+ 'orange',
143
+ '11111',
144
+ 'golfer',
145
+ 'cookie',
146
+ 'richard',
147
+ 'samantha',
148
+ 'bigdog',
149
+ 'guitar',
150
+ 'jackson',
151
+ 'whatever',
152
+ 'mickey',
153
+ 'chicken',
154
+ 'sparky',
155
+ 'snoopy',
156
+ 'maverick',
157
+ 'phoenix',
158
+ 'camaro',
159
+ 'sexy',
160
+ 'peanut',
161
+ 'morgan',
162
+ 'welcome',
163
+ 'falcon',
164
+ 'cowboy',
165
+ 'ferrari',
166
+ 'samsung',
167
+ 'andrea',
168
+ 'smokey',
169
+ 'steelers',
170
+ 'joseph',
171
+ 'mercedes',
172
+ 'dakota',
173
+ 'arsenal',
174
+ 'eagles',
175
+ 'melissa',
176
+ 'boomer',
177
+ 'booboo',
178
+ 'spider',
179
+ 'nascar',
180
+ 'monster',
181
+ 'tigers',
182
+ 'yellow',
183
+ 'xxxxxx',
184
+ '123123123',
185
+ 'gateway',
186
+ 'marina',
187
+ 'diablo',
188
+ 'bulldog',
189
+ 'qwer1234',
190
+ 'compaq',
191
+ 'purple',
192
+ 'hardcore',
193
+ 'banana',
194
+ 'junior',
195
+ 'hannah',
196
+ '123654',
197
+ 'porsche',
198
+ 'lakers',
199
+ 'iceman',
200
+ 'money',
201
+ 'cowboys',
202
+ '987654',
203
+ 'london',
204
+ 'tennis',
205
+ '999999',
206
+ 'ncc1701',
207
+ 'coffee',
208
+ 'scooby',
209
+ '0000',
210
+ 'miller',
211
+ 'boston',
212
+ 'q1w2e3r4',
213
+ 'fuckoff',
214
+ 'brandon',
215
+ 'yamaha',
216
+ 'chester',
217
+ 'mother',
218
+ 'forever',
219
+ 'johnny',
220
+ 'edward',
221
+ '333333',
222
+ 'oliver',
223
+ 'redsox',
224
+ 'player',
225
+ 'nikita',
226
+ 'knight',
227
+ 'fender',
228
+ 'barney',
229
+ 'midnight',
230
+ 'please',
231
+ 'brandy',
232
+ 'chicago',
233
+ 'badboy',
234
+ 'iwantu',
235
+ 'slayer',
236
+ 'rangers',
237
+ 'charles',
238
+ 'angel',
239
+ 'flower',
240
+ 'bigdaddy',
241
+ 'rabbit',
242
+ 'wizard',
243
+ 'bigdick',
244
+ 'jasper',
245
+ 'enter',
246
+ 'rachel',
247
+ 'chris',
248
+ 'steven',
249
+ 'winner',
250
+ 'adidas',
251
+ 'victoria',
252
+ 'natasha',
253
+ '1q2w3e4r',
254
+ 'jasmine',
255
+ 'winter',
256
+ 'prince',
257
+ 'panties',
258
+ 'marine',
259
+ 'ghbdtn',
260
+ 'fishing',
261
+ 'cocacola',
262
+ 'casper',
263
+ 'james',
264
+ '232323',
265
+ 'raiders',
266
+ '888888',
267
+ 'marlboro',
268
+ 'gandalf',
269
+ 'asdfasdf',
270
+ 'crystal',
271
+ '87654321',
272
+ '12344321',
273
+ 'sexsex',
274
+ 'golden',
275
+ 'blowme',
276
+ 'bigtits',
277
+ '8675309',
278
+ 'panther',
279
+ 'lauren',
280
+ 'angela',
281
+ 'bitch',
282
+ 'spanky',
283
+ 'thx1138',
284
+ 'angels',
285
+ 'madison',
286
+ 'winston',
287
+ 'shannon',
288
+ 'mike',
289
+ 'toyota',
290
+ 'blowjob',
291
+ 'jordan23',
292
+ 'canada',
293
+ 'sophie',
294
+ 'Password',
295
+ 'apples',
296
+ 'dick',
297
+ 'tiger',
298
+ 'razz',
299
+ '123abc',
300
+ 'pokemon',
301
+ 'qazxsw',
302
+ '55555',
303
+ 'qwaszx',
304
+ 'muffin',
305
+ 'johnson',
306
+ 'murphy',
307
+ 'cooper',
308
+ 'jonathan',
309
+ 'liverpoo',
310
+ 'david',
311
+ 'danielle',
312
+ '159357',
313
+ 'jackie',
314
+ '1990',
315
+ '123456a',
316
+ '789456',
317
+ 'turtle',
318
+ 'horny',
319
+ 'abcd1234',
320
+ 'scorpion',
321
+ 'qazwsxedc',
322
+ '101010',
323
+ 'butter',
324
+ 'carlos',
325
+ 'password1',
326
+ 'dennis',
327
+ 'slipknot',
328
+ 'qwerty123',
329
+ 'booger',
330
+ 'asdf',
331
+ '1991',
332
+ 'black',
333
+ 'startrek',
334
+ '12341234',
335
+ 'cameron',
336
+ 'newyork',
337
+ 'rainbow',
338
+ 'nathan',
339
+ 'john',
340
+ '1992',
341
+ 'rocket',
342
+ 'viking',
343
+ 'redskins',
344
+ 'butthead',
345
+ 'asdfghjkl',
346
+ '1212',
347
+ 'sierra',
348
+ 'peaches',
349
+ 'gemini',
350
+ 'doctor',
351
+ 'wilson',
352
+ 'sandra',
353
+ 'helpme',
354
+ 'qwertyui',
355
+ 'victor',
356
+ 'florida',
357
+ 'dolphin',
358
+ 'pookie',
359
+ 'captain',
360
+ 'tucker',
361
+ 'blue',
362
+ 'liverpool',
363
+ 'theman',
364
+ 'bandit',
365
+ 'dolphins',
366
+ 'maddog',
367
+ 'packers',
368
+ 'jaguar',
369
+ 'lovers',
370
+ 'nicholas',
371
+ 'united',
372
+ 'tiffany',
373
+ 'maxwell',
374
+ 'zzzzzz',
375
+ 'nirvana',
376
+ 'jeremy',
377
+ 'suckit',
378
+ 'stupid',
379
+ 'porn',
380
+ 'monica',
381
+ 'elephant',
382
+ 'giants',
383
+ 'jackass',
384
+ 'hotdog',
385
+ 'rosebud',
386
+ 'success',
387
+ 'debbie',
388
+ 'mountain',
389
+ '444444',
390
+ 'xxxxxxxx',
391
+ 'warrior',
392
+ '1q2w3e4r5t',
393
+ 'q1w2e3',
394
+ '123456q',
395
+ 'albert',
396
+ 'metallic',
397
+ 'lucky',
398
+ 'azerty',
399
+ '7777',
400
+ 'shithead',
401
+ 'alex',
402
+ 'bond007',
403
+ 'alexis',
404
+ '1111111',
405
+ 'samson',
406
+ '5150',
407
+ 'willie',
408
+ 'scorpio',
409
+ 'bonnie',
410
+ 'gators',
411
+ 'benjamin',
412
+ 'voodoo',
413
+ 'driver',
414
+ 'dexter',
415
+ '2112',
416
+ 'jason',
417
+ 'calvin',
418
+ 'freddy',
419
+ '212121',
420
+ 'creative',
421
+ '12345a',
422
+ 'sydney',
423
+ 'rush2112',
424
+ '1989',
425
+ 'asdfghjk',
426
+ 'red123',
427
+ 'bubba',
428
+ '4815162342',
429
+ 'passw0rd',
430
+ 'trouble',
431
+ 'gunner',
432
+ 'happy',
433
+ 'fucking',
434
+ 'gordon',
435
+ 'legend',
436
+ 'jessie',
437
+ 'stella',
438
+ 'qwert',
439
+ 'eminem',
440
+ 'arthur',
441
+ 'apple',
442
+ 'nissan',
443
+ 'bullshit',
444
+ 'bear',
445
+ 'america',
446
+ '1qazxsw2',
447
+ 'nothing',
448
+ 'parker',
449
+ '4444',
450
+ 'rebecca',
451
+ 'qweqwe',
452
+ 'garfield',
453
+ '01012011',
454
+ 'beavis',
455
+ '69696969',
456
+ 'jack',
457
+ 'asdasd',
458
+ 'december',
459
+ '2222',
460
+ '102030',
461
+ '252525',
462
+ '11223344',
463
+ 'magic',
464
+ 'apollo',
465
+ 'skippy',
466
+ '315475',
467
+ 'girls',
468
+ 'kitten',
469
+ 'golf',
470
+ 'copper',
471
+ 'braves',
472
+ 'shelby',
473
+ 'godzilla',
474
+ 'beaver',
475
+ 'fred',
476
+ 'tomcat',
477
+ 'august',
478
+ 'buddy',
479
+ 'airborne',
480
+ '1993',
481
+ '1988',
482
+ 'lifehack',
483
+ 'qqqqqq',
484
+ 'brooklyn',
485
+ 'animal',
486
+ 'platinum',
487
+ 'phantom',
488
+ 'online',
489
+ 'xavier',
490
+ 'darkness',
491
+ 'blink182',
492
+ 'power',
493
+ 'fish',
494
+ 'green',
495
+ '789456123',
496
+ 'voyager',
497
+ 'police',
498
+ 'travis',
499
+ '12qwaszx',
500
+ 'heaven',
501
+ 'snowball',
502
+ 'lover',
503
+ 'abcdef',
504
+ '00000',
505
+ 'pakistan',
506
+ '007007',
507
+ 'walter',
508
+ 'playboy',
509
+ 'blazer',
510
+ 'cricket',
511
+ 'sniper',
512
+ 'hooters',
513
+ 'donkey',
514
+ 'willow',
515
+ 'loveme',
516
+ 'saturn',
517
+ 'therock',
518
+ 'redwings',
519
+ 'bigboy',
520
+ 'pumpkin',
521
+ 'trinity',
522
+ 'williams',
523
+ 'tits',
524
+ 'nintendo',
525
+ 'digital',
526
+ 'destiny',
527
+ 'topgun',
528
+ 'runner',
529
+ 'marvin',
530
+ 'guinness',
531
+ 'chance',
532
+ 'bubbles',
533
+ 'testing',
534
+ 'fire',
535
+ 'november',
536
+ 'minecraft',
537
+ 'asdf1234',
538
+ 'lasvegas',
539
+ 'sergey',
540
+ 'broncos',
541
+ 'cartman',
542
+ 'private',
543
+ 'celtic',
544
+ 'birdie',
545
+ 'little',
546
+ 'cassie',
547
+ 'babygirl',
548
+ 'donald',
549
+ 'beatles',
550
+ '1313',
551
+ 'dickhead',
552
+ 'family',
553
+ '12121212',
554
+ 'school',
555
+ 'louise',
556
+ 'gabriel',
557
+ 'eclipse',
558
+ 'fluffy',
559
+ '147258369',
560
+ 'lol123',
561
+ 'explorer',
562
+ 'beer',
563
+ 'nelson',
564
+ 'flyers',
565
+ 'spencer',
566
+ 'scott',
567
+ 'lovely',
568
+ 'gibson',
569
+ 'doggie',
570
+ 'cherry',
571
+ 'andrey',
572
+ 'snickers',
573
+ 'buffalo',
574
+ 'pantera',
575
+ 'metallica',
576
+ 'member',
577
+ 'carter',
578
+ 'qwertyu',
579
+ 'peter',
580
+ 'alexande',
581
+ 'steve',
582
+ 'bronco',
583
+ 'paradise',
584
+ 'goober',
585
+ '5555',
586
+ 'samuel',
587
+ 'montana',
588
+ 'mexico',
589
+ 'dreams',
590
+ 'michigan',
591
+ 'cock',
592
+ 'carolina',
593
+ 'yankee',
594
+ 'friends',
595
+ 'magnum',
596
+ 'surfer',
597
+ 'poopoo',
598
+ 'maximus',
599
+ 'genius',
600
+ 'cool',
601
+ 'vampire',
602
+ 'lacrosse',
603
+ 'asd123',
604
+ 'aaaa',
605
+ 'christin',
606
+ 'kimberly',
607
+ 'speedy',
608
+ 'sharon',
609
+ 'carmen',
610
+ '111222',
611
+ 'kristina',
612
+ 'sammy',
613
+ 'racing',
614
+ 'ou812',
615
+ 'sabrina',
616
+ 'horses',
617
+ '0987654321',
618
+ 'qwerty1',
619
+ 'pimpin',
620
+ 'baby',
621
+ 'stalker',
622
+ 'enigma',
623
+ '147147',
624
+ 'star',
625
+ 'poohbear',
626
+ 'boobies',
627
+ '147258',
628
+ 'simple',
629
+ 'bollocks',
630
+ '12345q',
631
+ 'marcus',
632
+ 'brian',
633
+ '1987',
634
+ 'qweasdzxc',
635
+ 'drowssap',
636
+ 'hahaha',
637
+ 'caroline',
638
+ 'barbara',
639
+ 'dave',
640
+ 'viper',
641
+ 'drummer',
642
+ 'action',
643
+ 'einstein',
644
+ 'bitches',
645
+ 'genesis',
646
+ 'hello1',
647
+ 'scotty',
648
+ 'friend',
649
+ 'forest',
650
+ '010203',
651
+ 'hotrod',
652
+ 'google',
653
+ 'vanessa',
654
+ 'spitfire',
655
+ 'badger',
656
+ 'maryjane',
657
+ 'friday',
658
+ 'alaska',
659
+ '1232323q',
660
+ 'tester',
661
+ 'jester',
662
+ 'jake',
663
+ 'champion',
664
+ 'billy',
665
+ '147852',
666
+ 'rock',
667
+ 'hawaii',
668
+ 'badass',
669
+ 'chevy',
670
+ '420420',
671
+ 'walker',
672
+ 'stephen',
673
+ 'eagle1',
674
+ 'bill',
675
+ '1986',
676
+ 'october',
677
+ 'gregory',
678
+ 'svetlana',
679
+ 'pamela',
680
+ '1984',
681
+ 'music',
682
+ 'shorty',
683
+ 'westside',
684
+ 'stanley',
685
+ 'diesel',
686
+ 'courtney',
687
+ '242424',
688
+ 'kevin',
689
+ 'porno',
690
+ 'hitman',
691
+ 'boobs',
692
+ 'mark',
693
+ '12345qwert',
694
+ 'reddog',
695
+ 'frank',
696
+ 'qwe123',
697
+ 'popcorn',
698
+ 'patricia',
699
+ 'aaaaaaaa',
700
+ '1969',
701
+ 'teresa',
702
+ 'mozart',
703
+ 'buddha',
704
+ 'anderson',
705
+ 'paul',
706
+ 'melanie',
707
+ 'abcdefg',
708
+ 'security',
709
+ 'lucky1',
710
+ 'lizard',
711
+ 'denise',
712
+ '3333',
713
+ 'a12345',
714
+ '123789',
715
+ 'ruslan',
716
+ 'stargate',
717
+ 'simpsons',
718
+ 'scarface',
719
+ 'eagle',
720
+ '123456789a',
721
+ 'thumper',
722
+ 'olivia',
723
+ 'naruto',
724
+ '1234554321',
725
+ 'general',
726
+ 'cherokee',
727
+ 'a123456',
728
+ 'vincent',
729
+ 'Usuckballz1',
730
+ 'spooky',
731
+ 'qweasd',
732
+ 'cumshot',
733
+ 'free',
734
+ 'frankie',
735
+ 'douglas',
736
+ 'death',
737
+ '1980',
738
+ 'loveyou',
739
+ 'kitty',
740
+ 'kelly',
741
+ 'veronica',
742
+ 'suzuki',
743
+ 'semperfi',
744
+ 'penguin',
745
+ 'mercury',
746
+ 'liberty',
747
+ 'spirit',
748
+ 'scotland',
749
+ 'natalie',
750
+ 'marley',
751
+ 'vikings',
752
+ 'system',
753
+ 'sucker',
754
+ 'king',
755
+ 'allison',
756
+ 'marshall',
757
+ '1979',
758
+ '098765',
759
+ 'qwerty12',
760
+ 'hummer',
761
+ 'adrian',
762
+ '1985',
763
+ 'vfhbyf',
764
+ 'sandman',
765
+ 'rocky',
766
+ 'leslie',
767
+ 'antonio',
768
+ '98765432',
769
+ '4321',
770
+ 'softball',
771
+ 'passion',
772
+ 'mnbvcxz',
773
+ 'bastard',
774
+ 'passport',
775
+ 'horney',
776
+ 'rascal',
777
+ 'howard',
778
+ 'franklin',
779
+ 'bigred',
780
+ 'assman',
781
+ 'alexander',
782
+ 'homer',
783
+ 'redrum',
784
+ 'jupiter',
785
+ 'claudia',
786
+ '55555555',
787
+ '141414',
788
+ 'zaq12wsx',
789
+ 'shit',
790
+ 'patches',
791
+ 'nigger',
792
+ 'cunt',
793
+ 'raider',
794
+ 'infinity',
795
+ 'andre',
796
+ '54321',
797
+ 'galore',
798
+ 'college',
799
+ 'russia',
800
+ 'kawasaki',
801
+ 'bishop',
802
+ '77777777',
803
+ 'vladimir',
804
+ 'money1',
805
+ 'freeuser',
806
+ 'wildcats',
807
+ 'francis',
808
+ 'disney',
809
+ 'budlight',
810
+ 'brittany',
811
+ '1994',
812
+ '00000000',
813
+ 'sweet',
814
+ 'oksana',
815
+ 'honda',
816
+ 'domino',
817
+ 'bulldogs',
818
+ 'brutus',
819
+ 'swordfis',
820
+ 'norman',
821
+ 'monday',
822
+ 'jimmy',
823
+ 'ironman',
824
+ 'ford',
825
+ 'fantasy',
826
+ '9999',
827
+ '7654321',
828
+ 'PASSWORD',
829
+ 'hentai',
830
+ 'duncan',
831
+ 'cougar',
832
+ '1977',
833
+ 'jeffrey',
834
+ 'house',
835
+ 'dancer',
836
+ 'brooke',
837
+ 'timothy',
838
+ 'super',
839
+ 'marines',
840
+ 'justice',
841
+ 'digger',
842
+ 'connor',
843
+ 'patriots',
844
+ 'karina',
845
+ '202020',
846
+ 'molly',
847
+ 'everton',
848
+ 'tinker',
849
+ 'alicia',
850
+ 'rasdzv3',
851
+ 'poop',
852
+ 'pearljam',
853
+ 'stinky',
854
+ 'naughty',
855
+ 'colorado',
856
+ '123123a',
857
+ 'water',
858
+ 'test123',
859
+ 'ncc1701d',
860
+ 'motorola',
861
+ 'ireland',
862
+ 'asdfg',
863
+ 'slut',
864
+ 'matt',
865
+ 'houston',
866
+ 'boogie',
867
+ 'zombie',
868
+ 'accord',
869
+ 'vision',
870
+ 'bradley',
871
+ 'reggie',
872
+ 'kermit',
873
+ 'froggy',
874
+ 'ducati',
875
+ 'avalon',
876
+ '6666',
877
+ '9379992',
878
+ 'sarah',
879
+ 'saints',
880
+ 'logitech',
881
+ 'chopper',
882
+ '852456',
883
+ 'simpson',
884
+ 'madonna',
885
+ 'juventus',
886
+ 'claire',
887
+ '159951',
888
+ 'zachary',
889
+ 'yfnfif',
890
+ 'wolverin',
891
+ 'warcraft',
892
+ 'hello123',
893
+ 'extreme',
894
+ 'penis',
895
+ 'peekaboo',
896
+ 'fireman',
897
+ 'eugene',
898
+ 'brenda',
899
+ '123654789',
900
+ 'russell',
901
+ 'panthers',
902
+ 'georgia',
903
+ 'smith',
904
+ 'skyline',
905
+ 'jesus',
906
+ 'elizabet',
907
+ 'spiderma',
908
+ 'smooth',
909
+ 'pirate',
910
+ 'empire',
911
+ 'bullet',
912
+ '8888',
913
+ 'virginia',
914
+ 'valentin',
915
+ 'psycho',
916
+ 'predator',
917
+ 'arizona',
918
+ '134679',
919
+ 'mitchell',
920
+ 'alyssa',
921
+ 'vegeta',
922
+ 'titanic',
923
+ 'christ',
924
+ 'goblue',
925
+ 'fylhtq',
926
+ 'wolf',
927
+ 'mmmmmm',
928
+ 'kirill',
929
+ 'indian',
930
+ 'hiphop',
931
+ 'baxter',
932
+ 'awesome',
933
+ 'people',
934
+ 'danger',
935
+ 'roland',
936
+ 'mookie',
937
+ '741852963',
938
+ '1111111111',
939
+ 'dreamer',
940
+ 'bambam',
941
+ 'arnold',
942
+ '1981',
943
+ 'skipper',
944
+ 'serega',
945
+ 'rolltide',
946
+ 'elvis',
947
+ 'changeme',
948
+ 'simon',
949
+ '1q2w3e',
950
+ 'lovelove',
951
+ 'fktrcfylh',
952
+ 'denver',
953
+ 'tommy',
954
+ 'mine',
955
+ 'loverboy',
956
+ 'hobbes',
957
+ 'happy1',
958
+ 'alison',
959
+ 'nemesis',
960
+ 'chevelle',
961
+ 'cardinal',
962
+ 'burton',
963
+ 'wanker',
964
+ 'picard',
965
+ '151515',
966
+ 'tweety',
967
+ 'michael1',
968
+ '147852369',
969
+ '12312',
970
+ 'xxxx',
971
+ 'windows',
972
+ 'turkey',
973
+ '456789',
974
+ '1974',
975
+ 'vfrcbv',
976
+ 'sublime',
977
+ '1975',
978
+ 'galina',
979
+ 'bobby',
980
+ 'newport',
981
+ 'manutd',
982
+ 'daddy',
983
+ 'american',
984
+ 'alexandr',
985
+ '1966',
986
+ 'victory',
987
+ 'rooster',
988
+ 'qqq111',
989
+ 'madmax',
990
+ 'electric',
991
+ 'bigcock',
992
+ 'a1b2c3',
993
+ 'wolfpack',
994
+ 'spring',
995
+ 'phpbb',
996
+ 'lalala',
997
+ 'suckme',
998
+ 'spiderman',
999
+ 'eric',
1000
+ 'darkside',
1001
+ 'classic',
1002
+ 'raptor',
1003
+ '123456789q',
1004
+ 'hendrix',
1005
+ '1982',
1006
+ 'wombat',
1007
+ 'avatar',
1008
+ 'alpha',
1009
+ 'zxc123',
1010
+ 'crazy',
1011
+ 'hard',
1012
+ 'england',
1013
+ 'brazil',
1014
+ '1978',
1015
+ '01011980',
1016
+ 'wildcat',
1017
+ 'polina',
1018
+ 'freepass'
1019
+ ];
1020
+
18
1021
  /**
19
1022
  * Cognito wrapper to manage the authentication flow.
20
1023
  *
@@ -24,6 +1027,7 @@ class IDEAAuthService {
24
1027
  constructor(storage) {
25
1028
  this.storage = storage;
26
1029
  this.env = inject(IDEAEnvironment);
1030
+ this.t = inject(IDEATranslationsService);
27
1031
  this.deviceKeyAttribute = 'custom:'.concat(this.env.idea.project);
28
1032
  this.userPool = new CognitoUserPool({
29
1033
  UserPoolId: this.env.aws.cognito.userPoolId,
@@ -452,6 +1456,33 @@ class IDEAAuthService {
452
1456
  errors.push('REQUIRE_UPPERCASE');
453
1457
  return errors;
454
1458
  }
1459
+ /**
1460
+ * Validate the password against offline and online databases, to avoid common and exploited passwords.
1461
+ */
1462
+ async validatePasswordAgainstDatabases(password, customStringsToAvoid) {
1463
+ const errors = [];
1464
+ let pwd = (password || '').trim().toLowerCase();
1465
+ const pwdContains = (str) => pwd.includes((str || '').trim().toLowerCase());
1466
+ const projectReferencesToAvoid = [this.env.idea.project, this.env.idea.auth.title, this.t._('COMMON.APP_NAME')];
1467
+ if (projectReferencesToAvoid.some(x => pwdContains(x)))
1468
+ errors.push('COMMON_PASSWORD_PROJECT');
1469
+ if (customStringsToAvoid && customStringsToAvoid.some(x => pwdContains(x)))
1470
+ errors.push('COMMON_PASSWORD_CUSTOM');
1471
+ if (COMMON_PASSWORDS_TOP_1000.some(x => pwdContains(x)))
1472
+ errors.push('COMMON_PASSWORD_INTERNAL');
1473
+ if (errors.length === 0) {
1474
+ const pwdSHA1 = await SHA1(password);
1475
+ if (pwdSHA1) {
1476
+ const res = await fetch('https://api.pwnedpasswords.com/range/'.concat(pwdSHA1.slice(0, 5)));
1477
+ if (res.status === 200) {
1478
+ const pwnedPasswordsRawSuffixes = await res.text();
1479
+ if (pwnedPasswordsRawSuffixes.includes(pwdSHA1.slice(5)))
1480
+ errors.push('COMMON_PASSWORD_EXTERNAL');
1481
+ }
1482
+ }
1483
+ }
1484
+ return errors;
1485
+ }
455
1486
  /**
456
1487
  * Get a complete password policy pattern, based on the environments configuration, to use on password input fields.
457
1488
  * Note: some of the symbols couldn't be included because unsupported by the input[pattern] attribute.
@@ -486,6 +1517,18 @@ var LoginOutcomeActions;
486
1517
  LoginOutcomeActions["MFA_CHALLENGE"] = "mfaChallenge";
487
1518
  LoginOutcomeActions["MFA_SETUP"] = "mfaSetup";
488
1519
  })(LoginOutcomeActions || (LoginOutcomeActions = {}));
1520
+ /**
1521
+ * Get the SHA1 hex uppercase hash of a string, using web crypto.
1522
+ */
1523
+ const SHA1 = async (str) => {
1524
+ if (!window.crypto)
1525
+ return null;
1526
+ const msgUint8 = new TextEncoder().encode(str);
1527
+ const hashBuffer = await window.crypto.subtle.digest('SHA-1', msgUint8);
1528
+ const hashArray = Array.from(new Uint8Array(hashBuffer));
1529
+ const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
1530
+ return hashHex.toUpperCase();
1531
+ };
489
1532
 
490
1533
  class IDEASignInPage {
491
1534
  constructor(navCtrl, message, loading, t, auth) {
@@ -640,21 +1683,25 @@ class IDEASignUpPage {
640
1683
  : true;
641
1684
  }
642
1685
  async register() {
643
- this.errorMsg = null;
644
- if (isEmpty(this.email, 'email'))
645
- this.errorMsg = this.t._('IDEA_AUTH.VALID_EMAIL_OBLIGATORY');
646
- else {
647
- const errors = this.auth.validatePasswordAgainstPolicy(this.password);
648
- if (errors.length)
649
- this.errorMsg = [
650
- this.t._('IDEA_AUTH.PASSWORD_REQUIREMENTS_FOLLOW'),
651
- ...errors.map(x => this.t._('IDEA_AUTH.PASSWORD_REQUIREMENTS.'.concat(x), { n: this.passwordPolicy.minLength }))
652
- ].join(' ');
653
- }
654
- if (this.errorMsg)
655
- return this.message.error('IDEA_AUTH.REGISTRATION_FAILED');
656
1686
  try {
657
1687
  await this.loading.show();
1688
+ this.errorMsg = null;
1689
+ if (isEmpty(this.email, 'email'))
1690
+ this.errorMsg = this.t._('IDEA_AUTH.VALID_EMAIL_OBLIGATORY');
1691
+ else {
1692
+ const errors = this.auth.validatePasswordAgainstPolicy(this.password);
1693
+ if (errors.length === 0 && this.passwordPolicy.advancedPasswordCheck) {
1694
+ const emailParts = [...this.email?.split('@')[0].split(/\W/g)];
1695
+ errors.push(...(await this.auth.validatePasswordAgainstDatabases(this.password, emailParts)));
1696
+ }
1697
+ if (errors.length)
1698
+ this.errorMsg = [
1699
+ this.t._('IDEA_AUTH.PASSWORD_REQUIREMENTS_FOLLOW'),
1700
+ ...errors.map(x => this.t._('IDEA_AUTH.PASSWORD_REQUIREMENTS.'.concat(x), { n: this.passwordPolicy.minLength }))
1701
+ ].join(' ');
1702
+ }
1703
+ if (this.errorMsg)
1704
+ return this.message.error('IDEA_AUTH.REGISTRATION_FAILED');
658
1705
  await this.auth.register(this.email, this.password);
659
1706
  this.message.success('IDEA_AUTH.REGISTRATION_COMPLETED');
660
1707
  this.goToAuth();
@@ -706,8 +1753,11 @@ class IDEANewPasswordPage {
706
1753
  }
707
1754
  async confirmNewPassword() {
708
1755
  try {
1756
+ await this.loading.show();
709
1757
  this.errorMsg = null;
710
1758
  const errors = this.auth.validatePasswordAgainstPolicy(this.newPassword);
1759
+ if (errors.length === 0 && this.passwordPolicy.advancedPasswordCheck)
1760
+ errors.push(...(await this.auth.validatePasswordAgainstDatabases(this.newPassword)));
711
1761
  if (errors.length)
712
1762
  this.errorMsg = [
713
1763
  this.t._('IDEA_AUTH.PASSWORD_REQUIREMENTS_FOLLOW'),
@@ -715,7 +1765,6 @@ class IDEANewPasswordPage {
715
1765
  ].join(' ');
716
1766
  if (this.errorMsg)
717
1767
  return this.message.error('IDEA_AUTH.PASSWORD_REQUIREMENTS_FOLLOW');
718
- await this.loading.show();
719
1768
  await this.auth.confirmNewPassword(this.newPassword);
720
1769
  window.location.assign('');
721
1770
  }
@@ -838,8 +1887,13 @@ class IDEAConfirmPasswordPage {
838
1887
  }
839
1888
  async confirmPassword() {
840
1889
  try {
1890
+ await this.loading.show();
841
1891
  this.errorMsg = null;
842
1892
  const errors = this.auth.validatePasswordAgainstPolicy(this.newPassword);
1893
+ if (errors.length === 0 && this.passwordPolicy.advancedPasswordCheck) {
1894
+ const emailParts = [...this.email?.split('@')[0].split(/\W/g)];
1895
+ errors.push(...(await this.auth.validatePasswordAgainstDatabases(this.newPassword, emailParts)));
1896
+ }
843
1897
  if (errors.length)
844
1898
  this.errorMsg = [
845
1899
  this.t._('IDEA_AUTH.PASSWORD_REQUIREMENTS_FOLLOW'),
@@ -847,7 +1901,6 @@ class IDEAConfirmPasswordPage {
847
1901
  ].join(' ');
848
1902
  if (this.errorMsg)
849
1903
  return this.message.error('IDEA_AUTH.PASSWORD_REQUIREMENTS_FOLLOW');
850
- await this.loading.show();
851
1904
  await this.auth.confirmPassword(this.email, this.code, this.newPassword);
852
1905
  this.message.success('IDEA_AUTH.PASSWORD_CHANGED');
853
1906
  this.goToAuth();