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