1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | Object.defineProperty(exports, "__esModule", { value: true });
|
15 | var CognitoHostedUIIdentityProvider;
|
16 | (function (CognitoHostedUIIdentityProvider) {
|
17 | CognitoHostedUIIdentityProvider["Cognito"] = "COGNITO";
|
18 | CognitoHostedUIIdentityProvider["Google"] = "Google";
|
19 | CognitoHostedUIIdentityProvider["Facebook"] = "Facebook";
|
20 | CognitoHostedUIIdentityProvider["Amazon"] = "LoginWithAmazon";
|
21 | CognitoHostedUIIdentityProvider["Apple"] = "SignInWithApple";
|
22 | })(CognitoHostedUIIdentityProvider = exports.CognitoHostedUIIdentityProvider || (exports.CognitoHostedUIIdentityProvider = {}));
|
23 | function isFederatedSignInOptions(obj) {
|
24 | var keys = ['provider'];
|
25 | return obj && !!keys.find(function (k) { return obj.hasOwnProperty(k); });
|
26 | }
|
27 | exports.isFederatedSignInOptions = isFederatedSignInOptions;
|
28 | function isFederatedSignInOptionsCustom(obj) {
|
29 | var keys = ['customProvider'];
|
30 | return obj && !!keys.find(function (k) { return obj.hasOwnProperty(k); });
|
31 | }
|
32 | exports.isFederatedSignInOptionsCustom = isFederatedSignInOptionsCustom;
|
33 | function hasCustomState(obj) {
|
34 | var keys = ['customState'];
|
35 | return obj && !!keys.find(function (k) { return obj.hasOwnProperty(k); });
|
36 | }
|
37 | exports.hasCustomState = hasCustomState;
|
38 | function isCognitoHostedOpts(oauth) {
|
39 | return oauth.redirectSignIn !== undefined;
|
40 | }
|
41 | exports.isCognitoHostedOpts = isCognitoHostedOpts;
|
42 | var AuthErrorTypes;
|
43 | (function (AuthErrorTypes) {
|
44 | AuthErrorTypes["NoConfig"] = "noConfig";
|
45 | AuthErrorTypes["MissingAuthConfig"] = "missingAuthConfig";
|
46 | AuthErrorTypes["EmptyUsername"] = "emptyUsername";
|
47 | AuthErrorTypes["InvalidUsername"] = "invalidUsername";
|
48 | AuthErrorTypes["EmptyPassword"] = "emptyPassword";
|
49 | AuthErrorTypes["EmptyCode"] = "emptyCode";
|
50 | AuthErrorTypes["SignUpError"] = "signUpError";
|
51 | AuthErrorTypes["NoMFA"] = "noMFA";
|
52 | AuthErrorTypes["InvalidMFA"] = "invalidMFA";
|
53 | AuthErrorTypes["EmptyChallengeResponse"] = "emptyChallengeResponse";
|
54 | AuthErrorTypes["NoUserSession"] = "noUserSession";
|
55 | AuthErrorTypes["Default"] = "default";
|
56 | AuthErrorTypes["DeviceConfig"] = "deviceConfig";
|
57 | AuthErrorTypes["NetworkError"] = "networkError";
|
58 | })(AuthErrorTypes = exports.AuthErrorTypes || (exports.AuthErrorTypes = {}));
|
59 | function isUsernamePasswordOpts(obj) {
|
60 | return !!obj.username;
|
61 | }
|
62 | exports.isUsernamePasswordOpts = isUsernamePasswordOpts;
|
63 |
|
\ | No newline at end of file |