@idea-ionic/auth 6.11.1 → 6.12.1
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/environment.d.ts +1 -0
- package/esm2020/environment.mjs +3 -2
- package/esm2020/public-api.mjs +4 -1
- package/esm2020/src/auth.module.mjs +19 -6
- package/esm2020/src/auth.service.mjs +167 -42
- package/esm2020/src/confirmPassword.page.mjs +16 -22
- package/esm2020/src/forgotPassword.page.mjs +17 -24
- package/esm2020/src/mfaChallenge.page.mjs +45 -0
- package/esm2020/src/newPassword.page.mjs +18 -25
- package/esm2020/src/resendLink.page.mjs +12 -17
- package/esm2020/src/setupMFA/setupMFA.module.mjs +22 -0
- package/esm2020/src/setupMFA/setupMFAButton.component.mjs +43 -0
- package/esm2020/src/setupMFA/setupMFAModal.component.mjs +77 -0
- package/esm2020/src/setupMFA.page.mjs +24 -0
- package/esm2020/src/signIn.page.mjs +36 -47
- package/esm2020/src/signUp.page.mjs +18 -32
- package/fesm2015/idea-ionic-auth.mjs +485 -210
- package/fesm2015/idea-ionic-auth.mjs.map +1 -1
- package/fesm2020/idea-ionic-auth.mjs +470 -210
- package/fesm2020/idea-ionic-auth.mjs.map +1 -1
- package/package.json +13 -12
- package/public-api.d.ts +3 -0
- package/src/auth.module.d.ts +9 -6
- package/src/auth.service.d.ts +54 -13
- package/src/confirmPassword.page.d.ts +11 -30
- package/src/forgotPassword.page.d.ts +6 -19
- package/src/mfaChallenge.page.d.ts +20 -0
- package/src/newPassword.page.d.ts +7 -28
- package/src/resendLink.page.d.ts +5 -17
- package/src/setupMFA/setupMFA.module.d.ts +12 -0
- package/src/setupMFA/setupMFAButton.component.d.ts +26 -0
- package/src/setupMFA/setupMFAModal.component.d.ts +20 -0
- package/src/setupMFA.page.d.ts +10 -0
- package/src/signIn.page.d.ts +9 -51
- package/src/signUp.page.d.ts +8 -29
package/package.json
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idea-ionic/auth",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.12.1",
|
|
4
4
|
"description": "IDEA Ionic auth flow",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"tslib": "^2.4.1"
|
|
7
7
|
},
|
|
8
8
|
"peerDependencies": {
|
|
9
|
-
"@angular/common": "
|
|
10
|
-
"@angular/core": "
|
|
11
|
-
"@angular/forms": "
|
|
12
|
-
"@angular/platform-browser": "
|
|
13
|
-
"@angular/router": "
|
|
9
|
+
"@angular/common": "^15.0.4",
|
|
10
|
+
"@angular/core": "^15.0.4",
|
|
11
|
+
"@angular/forms": "^15.0.4",
|
|
12
|
+
"@angular/platform-browser": "^15.0.4",
|
|
13
|
+
"@angular/router": "^15.0.4",
|
|
14
14
|
"@capacitor/browser": "^4.x.x",
|
|
15
15
|
"@capacitor/core": "^4.x.x",
|
|
16
|
-
"@ionic/angular": "
|
|
17
|
-
"@ionic/storage-angular": "
|
|
18
|
-
"amazon-cognito-identity-js": "
|
|
19
|
-
"idea-toolbox": "
|
|
20
|
-
"
|
|
21
|
-
"
|
|
16
|
+
"@ionic/angular": "^6.4.1",
|
|
17
|
+
"@ionic/storage-angular": "^3.0.6",
|
|
18
|
+
"amazon-cognito-identity-js": "^6.1.1",
|
|
19
|
+
"idea-toolbox": "^6.7.x",
|
|
20
|
+
"qrcode": "^1.5.x",
|
|
21
|
+
"rxjs": "^7.8.0",
|
|
22
|
+
"zone.js": "^0.12.0"
|
|
22
23
|
},
|
|
23
24
|
"repository": {
|
|
24
25
|
"type": "git",
|
package/public-api.d.ts
CHANGED
package/src/auth.module.d.ts
CHANGED
|
@@ -5,13 +5,16 @@ import * as i3 from "./newPassword.page";
|
|
|
5
5
|
import * as i4 from "./resendLink.page";
|
|
6
6
|
import * as i5 from "./forgotPassword.page";
|
|
7
7
|
import * as i6 from "./confirmPassword.page";
|
|
8
|
-
import * as i7 from "
|
|
9
|
-
import * as i8 from "
|
|
10
|
-
import * as i9 from "@
|
|
11
|
-
import * as i10 from "@
|
|
12
|
-
import * as i11 from "@angular
|
|
8
|
+
import * as i7 from "./mfaChallenge.page";
|
|
9
|
+
import * as i8 from "./setupMFA.page";
|
|
10
|
+
import * as i9 from "@angular/common";
|
|
11
|
+
import * as i10 from "@angular/forms";
|
|
12
|
+
import * as i11 from "@ionic/angular";
|
|
13
|
+
import * as i12 from "@idea-ionic/common";
|
|
14
|
+
import * as i13 from "@angular/router";
|
|
15
|
+
import * as i14 from "./setupMFA/setupMFA.module";
|
|
13
16
|
export declare class IDEAAuthModule {
|
|
14
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<IDEAAuthModule, never>;
|
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<IDEAAuthModule, [typeof i1.IDEASignInPage, typeof i2.IDEASignUpPage, typeof i3.IDEANewPasswordPage, typeof i4.IDEAResendLinkPage, typeof i5.IDEAForgotPasswordPage, typeof i6.IDEAConfirmPasswordPage], [typeof
|
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IDEAAuthModule, [typeof i1.IDEASignInPage, typeof i2.IDEASignUpPage, typeof i3.IDEANewPasswordPage, typeof i4.IDEAResendLinkPage, typeof i5.IDEAForgotPasswordPage, typeof i6.IDEAConfirmPasswordPage, typeof i7.IDEAMFAChallengePage, typeof i8.IDEASetupMFAPage], [typeof i9.CommonModule, typeof i10.FormsModule, typeof i11.IonicModule, typeof i12.IDEATranslationsModule, typeof i13.RouterModule, typeof i14.IDEASetupMFAModule], never>;
|
|
16
19
|
static ɵinj: i0.ɵɵInjectorDeclaration<IDEAAuthModule>;
|
|
17
20
|
}
|
package/src/auth.service.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CognitoUser } from 'amazon-cognito-identity-js';
|
|
2
2
|
import { IDEAStorageService } from '@idea-ionic/common';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
@@ -7,33 +7,45 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
* Note: in IDEA's Cognito users pools, the email is an alias of the username.
|
|
8
8
|
*/
|
|
9
9
|
export declare class IDEAAuthService {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
private storage;
|
|
11
|
+
private userPool;
|
|
12
|
+
challengeUsername: string;
|
|
13
|
+
private challengePassword;
|
|
14
|
+
private newAccountJustRegistered;
|
|
15
|
+
private mfaProjectName;
|
|
12
16
|
constructor(storage: IDEAStorageService);
|
|
13
17
|
/**
|
|
14
18
|
* Prepare the necessary structure to get authorized in Cognito.
|
|
15
19
|
*/
|
|
16
|
-
|
|
20
|
+
private prepareAuthDetails;
|
|
17
21
|
/**
|
|
18
22
|
* Prepare the necessary structure to identify a Cognito user.
|
|
19
23
|
*/
|
|
20
|
-
|
|
24
|
+
prepareCognitoUser(username: string): CognitoUser;
|
|
21
25
|
/**
|
|
22
26
|
* Prepare a user attribute (they are all strings) in Cognito's format.
|
|
23
27
|
*/
|
|
24
|
-
|
|
28
|
+
private prepareUserAttribute;
|
|
25
29
|
/**
|
|
26
30
|
* Perform a login through username and password.
|
|
27
31
|
*/
|
|
28
|
-
login(username: string, password: string): Promise<
|
|
32
|
+
login(username: string, password: string): Promise<LoginOutcomeActions>;
|
|
29
33
|
/**
|
|
30
|
-
* Complete
|
|
34
|
+
* Complete the new password flow in the authentication.
|
|
31
35
|
*/
|
|
32
|
-
confirmNewPassword(
|
|
36
|
+
confirmNewPassword(newPassword: string): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Complete the MFA challenge flow in the authentication.
|
|
39
|
+
*/
|
|
40
|
+
completeMFAChallenge(otpCode: string): Promise<void>;
|
|
33
41
|
/**
|
|
34
42
|
* Register a new user a set its default attributes.
|
|
35
43
|
*/
|
|
36
44
|
register(username: string, password: string, attributes?: any): Promise<CognitoUser>;
|
|
45
|
+
/**
|
|
46
|
+
* In case new account has just been registered, return the username.
|
|
47
|
+
*/
|
|
48
|
+
getNewAccountJustRegistered(): string;
|
|
37
49
|
/**
|
|
38
50
|
* Confirm a new registration through the confirmation code sent by Cognito.
|
|
39
51
|
*/
|
|
@@ -56,6 +68,26 @@ export declare class IDEAAuthService {
|
|
|
56
68
|
* Confirm a new password after a password reset request.
|
|
57
69
|
*/
|
|
58
70
|
confirmPassword(username: string, code: string, newPwd: string): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Gets the URL for enabling MFA. This URL can be used to generate a QR Code to read with an authenticator app.
|
|
73
|
+
*/
|
|
74
|
+
getURLForEnablingMFA(): Promise<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Check whether the user has MFA enabled.
|
|
77
|
+
*/
|
|
78
|
+
checkIfUserHasMFAEnabled(bypassCache?: boolean): Promise<boolean>;
|
|
79
|
+
/**
|
|
80
|
+
* Configure a MFA device for the user.
|
|
81
|
+
*/
|
|
82
|
+
private setMFADevice;
|
|
83
|
+
/**
|
|
84
|
+
* Enable a new MFA device for the user by inserting an OTP code generated by it.
|
|
85
|
+
*/
|
|
86
|
+
enableMFA(otp: string, mfaDeviceName?: string): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Disable MFA for a user by inserting an OTP code generated by it.
|
|
89
|
+
*/
|
|
90
|
+
disableMFA(otp: string, mfaDeviceName?: string): Promise<void>;
|
|
59
91
|
/**
|
|
60
92
|
* Check if a user is currently authenticated.
|
|
61
93
|
* @param offlineAllowed if set and if offline, skip authentication and retrieve data locally
|
|
@@ -65,22 +97,22 @@ export declare class IDEAAuthService {
|
|
|
65
97
|
/**
|
|
66
98
|
* Helper to refresh the session every N minutes.
|
|
67
99
|
*/
|
|
68
|
-
|
|
100
|
+
private refreshSession;
|
|
69
101
|
/**
|
|
70
102
|
* Run some post-auth checks, based on the users groups and on the app's configuration:
|
|
71
103
|
* - users in the Cognito's "admins" grup skip all the following rules.
|
|
72
104
|
* - users in the Cognito's "robots" group can't sign-into front-ends (they serve only back-end purposes).
|
|
73
105
|
* - if `env.idea.auth.singleSimultaneousSession` is on, make sure there is only one active session per user.
|
|
74
106
|
*/
|
|
75
|
-
|
|
107
|
+
private runPostAuthChecks;
|
|
76
108
|
/**
|
|
77
109
|
* Check whether the user signed-into multiple devices.
|
|
78
110
|
*/
|
|
79
|
-
|
|
111
|
+
private checkForSimultaneousSessions;
|
|
80
112
|
/**
|
|
81
113
|
* Set (or reset) the current user's device (by key) in the current project (stored in Cognito).
|
|
82
114
|
*/
|
|
83
|
-
|
|
115
|
+
private setCurrentDeviceForProject;
|
|
84
116
|
/**
|
|
85
117
|
* Update the currently logged in user's attributes.
|
|
86
118
|
*/
|
|
@@ -88,3 +120,12 @@ export declare class IDEAAuthService {
|
|
|
88
120
|
static ɵfac: i0.ɵɵFactoryDeclaration<IDEAAuthService, never>;
|
|
89
121
|
static ɵprov: i0.ɵɵInjectableDeclaration<IDEAAuthService>;
|
|
90
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* The possible actions following a successful login.
|
|
125
|
+
*/
|
|
126
|
+
export declare enum LoginOutcomeActions {
|
|
127
|
+
NONE = "none",
|
|
128
|
+
NEW_PASSWORD = "newPassword",
|
|
129
|
+
MFA_CHALLENGE = "mfaChallenge",
|
|
130
|
+
MFA_SETUP = "mfaSetup"
|
|
131
|
+
}
|
|
@@ -1,43 +1,24 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
1
2
|
import { NavController } from '@ionic/angular';
|
|
2
3
|
import { ActivatedRoute } from '@angular/router';
|
|
3
|
-
import { IDEAAuthService } from './auth.service';
|
|
4
4
|
import { IDEAMessageService, IDEALoadingService, IDEATranslationsService } from '@idea-ionic/common';
|
|
5
|
+
import { IDEAAuthService } from './auth.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class IDEAConfirmPasswordPage {
|
|
7
|
-
navCtrl
|
|
8
|
-
route
|
|
9
|
-
message
|
|
10
|
-
loading
|
|
11
|
-
auth
|
|
12
|
-
t
|
|
13
|
-
/**
|
|
14
|
-
* The email address used to identify the account.
|
|
15
|
-
*/
|
|
7
|
+
export declare class IDEAConfirmPasswordPage implements OnInit {
|
|
8
|
+
private navCtrl;
|
|
9
|
+
private route;
|
|
10
|
+
private message;
|
|
11
|
+
private loading;
|
|
12
|
+
private auth;
|
|
13
|
+
private t;
|
|
16
14
|
email: string;
|
|
17
|
-
/**
|
|
18
|
-
* The code (received via email), to use for confirming the account.
|
|
19
|
-
*/
|
|
20
|
-
code: string;
|
|
21
|
-
/**
|
|
22
|
-
* The new password for the account.
|
|
23
|
-
*/
|
|
24
15
|
newPassword: string;
|
|
25
|
-
|
|
26
|
-
* The error message to display in the UI, if any.
|
|
27
|
-
*/
|
|
16
|
+
code: string;
|
|
28
17
|
errorMsg: string;
|
|
29
18
|
constructor(navCtrl: NavController, route: ActivatedRoute, message: IDEAMessageService, loading: IDEALoadingService, auth: IDEAAuthService, t: IDEATranslationsService);
|
|
30
|
-
|
|
31
|
-
* Confirm new password.
|
|
32
|
-
*/
|
|
19
|
+
ngOnInit(): void;
|
|
33
20
|
confirmPassword(): Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Go to forgot password page.
|
|
36
|
-
*/
|
|
37
21
|
goToForgotPassword(): void;
|
|
38
|
-
/**
|
|
39
|
-
* Go to auth page.
|
|
40
|
-
*/
|
|
41
22
|
goToAuth(): void;
|
|
42
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<IDEAConfirmPasswordPage, never>;
|
|
43
24
|
static ɵcmp: i0.ɵɵComponentDeclaration<IDEAConfirmPasswordPage, "idea-confirm-password", never, {}, {}, never, never, false, never>;
|
|
@@ -1,29 +1,16 @@
|
|
|
1
1
|
import { NavController } from '@ionic/angular';
|
|
2
|
+
import { IDEAMessageService, IDEALoadingService } from '@idea-ionic/common';
|
|
2
3
|
import { IDEAAuthService } from './auth.service';
|
|
3
|
-
import { IDEAMessageService, IDEALoadingService, IDEATranslationsService } from '@idea-ionic/common';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class IDEAForgotPasswordPage {
|
|
6
|
-
navCtrl
|
|
7
|
-
message
|
|
8
|
-
loading
|
|
9
|
-
auth
|
|
10
|
-
t: IDEATranslationsService;
|
|
11
|
-
/**
|
|
12
|
-
* The email address used to identify the account.
|
|
13
|
-
*/
|
|
6
|
+
private navCtrl;
|
|
7
|
+
private message;
|
|
8
|
+
private loading;
|
|
9
|
+
private auth;
|
|
14
10
|
email: string;
|
|
15
|
-
constructor(navCtrl: NavController, message: IDEAMessageService, loading: IDEALoadingService, auth: IDEAAuthService
|
|
16
|
-
/**
|
|
17
|
-
* "I forgot my password" procedure.
|
|
18
|
-
*/
|
|
11
|
+
constructor(navCtrl: NavController, message: IDEAMessageService, loading: IDEALoadingService, auth: IDEAAuthService);
|
|
19
12
|
forgotPassword(): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Go to the confirm password page.
|
|
22
|
-
*/
|
|
23
13
|
goToConfirmPassword(): void;
|
|
24
|
-
/**
|
|
25
|
-
* Go to auth page.
|
|
26
|
-
*/
|
|
27
14
|
goToAuth(): void;
|
|
28
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<IDEAForgotPasswordPage, never>;
|
|
29
16
|
static ɵcmp: i0.ɵɵComponentDeclaration<IDEAForgotPasswordPage, "idea-forgot-password", never, {}, {}, never, never, false, never>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { NavController } from '@ionic/angular';
|
|
3
|
+
import { IDEAMessageService, IDEALoadingService, IDEATranslationsService } from '@idea-ionic/common';
|
|
4
|
+
import { IDEAAuthService } from './auth.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class IDEAMFAChallengePage implements OnInit {
|
|
7
|
+
private navCtrl;
|
|
8
|
+
private message;
|
|
9
|
+
private loading;
|
|
10
|
+
private auth;
|
|
11
|
+
private t;
|
|
12
|
+
otpCode: string;
|
|
13
|
+
errorMsg: string;
|
|
14
|
+
constructor(navCtrl: NavController, message: IDEAMessageService, loading: IDEALoadingService, auth: IDEAAuthService, t: IDEATranslationsService);
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
completeMFAChallenge(): Promise<void>;
|
|
17
|
+
goToAuth(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IDEAMFAChallengePage, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IDEAMFAChallengePage, "idea-mfa-challenge", never, {}, {}, never, never, false, never>;
|
|
20
|
+
}
|
|
@@ -1,40 +1,19 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { NavController } from '@ionic/angular';
|
|
3
|
-
import { IDEAMessageService, IDEALoadingService,
|
|
3
|
+
import { IDEAMessageService, IDEALoadingService, IDEATranslationsService } from '@idea-ionic/common';
|
|
4
4
|
import { IDEAAuthService } from './auth.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class IDEANewPasswordPage implements OnInit {
|
|
7
|
-
navCtrl
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
t: IDEATranslationsService;
|
|
13
|
-
/**
|
|
14
|
-
* The email address used to identify the account.
|
|
15
|
-
*/
|
|
16
|
-
email: string;
|
|
17
|
-
/**
|
|
18
|
-
* The current temporary password.
|
|
19
|
-
*/
|
|
20
|
-
password: string;
|
|
21
|
-
/**
|
|
22
|
-
* The new password for the account.
|
|
23
|
-
*/
|
|
7
|
+
private navCtrl;
|
|
8
|
+
private message;
|
|
9
|
+
private loading;
|
|
10
|
+
private auth;
|
|
11
|
+
private t;
|
|
24
12
|
newPassword: string;
|
|
25
|
-
/**
|
|
26
|
-
* The error message to display in the UI, if any.
|
|
27
|
-
*/
|
|
28
13
|
errorMsg: string;
|
|
29
|
-
constructor(navCtrl: NavController,
|
|
14
|
+
constructor(navCtrl: NavController, message: IDEAMessageService, loading: IDEALoadingService, auth: IDEAAuthService, t: IDEATranslationsService);
|
|
30
15
|
ngOnInit(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Confirm a new password (auth flow that follows a registration or a password reset).
|
|
33
|
-
*/
|
|
34
16
|
confirmNewPassword(): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Go to auth page.
|
|
37
|
-
*/
|
|
38
17
|
goToAuth(): void;
|
|
39
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<IDEANewPasswordPage, never>;
|
|
40
19
|
static ɵcmp: i0.ɵɵComponentDeclaration<IDEANewPasswordPage, "idea-new-password", never, {}, {}, never, never, false, never>;
|
package/src/resendLink.page.d.ts
CHANGED
|
@@ -3,27 +3,15 @@ import { IDEAMessageService, IDEALoadingService, IDEATranslationsService } from
|
|
|
3
3
|
import { IDEAAuthService } from './auth.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class IDEAResendLinkPage {
|
|
6
|
-
navCtrl
|
|
7
|
-
message
|
|
8
|
-
loading
|
|
9
|
-
auth
|
|
10
|
-
t
|
|
11
|
-
/**
|
|
12
|
-
* The email address used to identify the account.
|
|
13
|
-
*/
|
|
6
|
+
private navCtrl;
|
|
7
|
+
private message;
|
|
8
|
+
private loading;
|
|
9
|
+
private auth;
|
|
10
|
+
private t;
|
|
14
11
|
email: string;
|
|
15
|
-
/**
|
|
16
|
-
* The error message to display in the UI, if any.
|
|
17
|
-
*/
|
|
18
12
|
errorMsg: string;
|
|
19
13
|
constructor(navCtrl: NavController, message: IDEAMessageService, loading: IDEALoadingService, auth: IDEAAuthService, t: IDEATranslationsService);
|
|
20
|
-
/**
|
|
21
|
-
* Resend the link to confirm the email address.
|
|
22
|
-
*/
|
|
23
14
|
resendConfirmationLink(): Promise<void>;
|
|
24
|
-
/**
|
|
25
|
-
* Go to auth page.
|
|
26
|
-
*/
|
|
27
15
|
goToAuth(): void;
|
|
28
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<IDEAResendLinkPage, never>;
|
|
29
17
|
static ɵcmp: i0.ɵɵComponentDeclaration<IDEAResendLinkPage, "idea-resend-link", never, {}, {}, never, never, false, never>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./setupMFAModal.component";
|
|
3
|
+
import * as i2 from "./setupMFAButton.component";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@angular/forms";
|
|
6
|
+
import * as i5 from "@ionic/angular";
|
|
7
|
+
import * as i6 from "@idea-ionic/common";
|
|
8
|
+
export declare class IDEASetupMFAModule {
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IDEASetupMFAModule, never>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IDEASetupMFAModule, [typeof i1.IDEASetupMFAModalComponent, typeof i2.IDEASetupMFAButtonComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.IonicModule, typeof i6.IDEATranslationsModule], [typeof i1.IDEASetupMFAModalComponent, typeof i2.IDEASetupMFAButtonComponent]>;
|
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<IDEASetupMFAModule>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { ModalController } from '@ionic/angular';
|
|
3
|
+
import { IDEAAuthService } from '../auth.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class IDEASetupMFAButtonComponent implements OnInit {
|
|
6
|
+
private modalCtrl;
|
|
7
|
+
private auth;
|
|
8
|
+
/**
|
|
9
|
+
* The color of the button.
|
|
10
|
+
*/
|
|
11
|
+
color: string;
|
|
12
|
+
/**
|
|
13
|
+
* The fill option for the button.
|
|
14
|
+
*/
|
|
15
|
+
fill: string;
|
|
16
|
+
/**
|
|
17
|
+
* Trigger then the MFA setup changes.
|
|
18
|
+
*/
|
|
19
|
+
change: EventEmitter<boolean>;
|
|
20
|
+
isMFAEnabled: boolean;
|
|
21
|
+
constructor(modalCtrl: ModalController, auth: IDEAAuthService);
|
|
22
|
+
ngOnInit(): Promise<void>;
|
|
23
|
+
openMFAModal(): Promise<void>;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IDEASetupMFAButtonComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IDEASetupMFAButtonComponent, "idea-setup-mfa-button", never, { "color": "color"; "fill": "fill"; }, { "change": "change"; }, never, never, false, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ModalController } from '@ionic/angular';
|
|
3
|
+
import { IDEAAuthService } from '../auth.service';
|
|
4
|
+
import { IDEALoadingService, IDEAMessageService } from '@idea-ionic/common';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class IDEASetupMFAModalComponent implements OnInit {
|
|
7
|
+
private modalCtrl;
|
|
8
|
+
private loading;
|
|
9
|
+
private message;
|
|
10
|
+
private auth;
|
|
11
|
+
otpCode: string;
|
|
12
|
+
isMFAEnabled: boolean;
|
|
13
|
+
constructor(modalCtrl: ModalController, loading: IDEALoadingService, message: IDEAMessageService, auth: IDEAAuthService);
|
|
14
|
+
ngOnInit(): Promise<void>;
|
|
15
|
+
private generateQRCodeCanvasByURL;
|
|
16
|
+
setMFA(enable: boolean): Promise<void>;
|
|
17
|
+
close(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IDEASetupMFAModalComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IDEASetupMFAModalComponent, "idea-setup-mfa-modal", never, {}, {}, never, never, false, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NavController } from '@ionic/angular';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class IDEASetupMFAPage {
|
|
4
|
+
private navCtrl;
|
|
5
|
+
constructor(navCtrl: NavController);
|
|
6
|
+
reloadApp(): void;
|
|
7
|
+
goToAuth(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IDEASetupMFAPage, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IDEASetupMFAPage, "idea-mfa-setup", never, {}, {}, never, never, false, never>;
|
|
10
|
+
}
|
package/src/signIn.page.d.ts
CHANGED
|
@@ -1,73 +1,31 @@
|
|
|
1
1
|
import { NavController } from '@ionic/angular';
|
|
2
|
-
import { IDEAMessageService, IDEALoadingService,
|
|
2
|
+
import { IDEAMessageService, IDEALoadingService, IDEATranslationsService } from '@idea-ionic/common';
|
|
3
3
|
import { IDEAAuthService } from './auth.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class IDEASignInPage {
|
|
6
|
-
navCtrl
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
t: IDEATranslationsService;
|
|
12
|
-
/**
|
|
13
|
-
* The title of the project.
|
|
14
|
-
*/
|
|
6
|
+
private navCtrl;
|
|
7
|
+
private message;
|
|
8
|
+
private loading;
|
|
9
|
+
private auth;
|
|
10
|
+
private t;
|
|
15
11
|
title: string;
|
|
16
|
-
/**
|
|
17
|
-
* Whether the public registration is allowed for the project.
|
|
18
|
-
*/
|
|
19
12
|
registrationPossible: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Whether the project has an intro (explanatory) page.
|
|
22
|
-
*/
|
|
23
13
|
hasIntroPage: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* The URL to IDEA's website.
|
|
26
|
-
*/
|
|
27
14
|
website: string;
|
|
28
|
-
/**
|
|
29
|
-
* The email address to identify a user.
|
|
30
|
-
*/
|
|
31
15
|
email: string;
|
|
32
|
-
/**
|
|
33
|
-
* The password to login for the email selected.
|
|
34
|
-
*/
|
|
35
16
|
password: string;
|
|
36
|
-
/**
|
|
37
|
-
* Whether the agreements have been accepted.
|
|
38
|
-
*/
|
|
39
17
|
agreementsCheck: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Whether a new account was just created through the SignUp page.
|
|
42
|
-
*/
|
|
43
18
|
newAccountRegistered: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* The error message to display in the UI, if any.
|
|
46
|
-
*/
|
|
47
19
|
errorMsg: string;
|
|
48
20
|
darkMode: boolean;
|
|
49
|
-
constructor(navCtrl: NavController,
|
|
21
|
+
constructor(navCtrl: NavController, message: IDEAMessageService, loading: IDEALoadingService, auth: IDEAAuthService, t: IDEATranslationsService);
|
|
50
22
|
ionViewDidEnter(): void;
|
|
51
|
-
/**
|
|
52
|
-
* Sign-in with the auth details provided.
|
|
53
|
-
*/
|
|
54
23
|
login(): Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* Go to the homepage.
|
|
57
|
-
*/
|
|
58
24
|
goToIntro(): void;
|
|
59
|
-
/**
|
|
60
|
-
* Go to the forgot password page.
|
|
61
|
-
*/
|
|
62
25
|
goToForgotPassword(): void;
|
|
63
|
-
/**
|
|
64
|
-
* Go to registration page.
|
|
65
|
-
*/
|
|
66
26
|
goToRegistration(): void;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
*/
|
|
70
|
-
openLink(url: string): void;
|
|
27
|
+
translationExists(key: string): boolean;
|
|
28
|
+
openLink(url: string): Promise<void>;
|
|
71
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<IDEASignInPage, never>;
|
|
72
30
|
static ɵcmp: i0.ɵɵComponentDeclaration<IDEASignInPage, "idea-sign-in", never, {}, {}, never, never, false, never>;
|
|
73
31
|
}
|
package/src/signUp.page.d.ts
CHANGED
|
@@ -1,44 +1,23 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { NavController } from '@ionic/angular';
|
|
3
|
-
import { IDEAMessageService, IDEALoadingService,
|
|
3
|
+
import { IDEAMessageService, IDEALoadingService, IDEATranslationsService } from '@idea-ionic/common';
|
|
4
4
|
import { IDEAAuthService } from './auth.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class IDEASignUpPage implements OnInit {
|
|
7
|
-
navCtrl
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
t: IDEATranslationsService;
|
|
13
|
-
/**
|
|
14
|
-
* The email address used to identify the new account.
|
|
15
|
-
*/
|
|
7
|
+
private navCtrl;
|
|
8
|
+
private message;
|
|
9
|
+
private loading;
|
|
10
|
+
private auth;
|
|
11
|
+
private t;
|
|
16
12
|
email: string;
|
|
17
|
-
/**
|
|
18
|
-
* The password of the new account.
|
|
19
|
-
*/
|
|
20
13
|
password: string;
|
|
21
|
-
/**
|
|
22
|
-
* Whether the agreements have been accepted.
|
|
23
|
-
*/
|
|
24
14
|
agreementsCheck: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* The error message to display in the UI, if any.
|
|
27
|
-
*/
|
|
28
15
|
errorMsg: string;
|
|
29
|
-
constructor(navCtrl: NavController,
|
|
16
|
+
constructor(navCtrl: NavController, message: IDEAMessageService, loading: IDEALoadingService, auth: IDEAAuthService, t: IDEATranslationsService);
|
|
30
17
|
ngOnInit(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Register the new user in cognito (note DynamoDB still need to be managed).
|
|
33
|
-
*/
|
|
34
18
|
register(): Promise<void>;
|
|
35
|
-
|
|
36
|
-
* Go to the resend link page.
|
|
37
|
-
*/
|
|
19
|
+
translationExists(key: string): boolean;
|
|
38
20
|
goToResendLink(): void;
|
|
39
|
-
/**
|
|
40
|
-
* Go to auth page.
|
|
41
|
-
*/
|
|
42
21
|
goToAuth(): void;
|
|
43
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<IDEASignUpPage, never>;
|
|
44
23
|
static ɵcmp: i0.ɵɵComponentDeclaration<IDEASignUpPage, "idea-sign-up", never, {}, {}, never, never, false, never>;
|