@vardario/cognito-client 5.2.0 → 5.2.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/lib/browser.js CHANGED
@@ -803,14 +803,12 @@ var ServiceTarget = /* @__PURE__ */ ((ServiceTarget2) => {
803
803
  ServiceTarget2["ListWebAuthnCredentials"] = "ListWebAuthnCredentials";
804
804
  return ServiceTarget2;
805
805
  })(ServiceTarget || {});
806
- var IdentityProvider = /* @__PURE__ */ ((IdentityProvider2) => {
807
- IdentityProvider2["Cognito"] = "COGNITO";
808
- IdentityProvider2["Google"] = "Google";
809
- IdentityProvider2["Facebook"] = "Facebook";
810
- IdentityProvider2["Amazon"] = "LoginWithAmazon";
811
- IdentityProvider2["Apple"] = "SignInWithApple";
812
- return IdentityProvider2;
813
- })(IdentityProvider || {});
806
+ var IdentityProvider = {
807
+ Cognito: "COGNITO",
808
+ Google: "Google",
809
+ Facebook: "Facebook",
810
+ Apple: "SignInWithApple"
811
+ };
814
812
  function adaptExpiresIn(auth) {
815
813
  return {
816
814
  ...auth,
@@ -323,16 +323,14 @@ export interface ListDevicesResponse {
323
323
  PaginationToken?: string;
324
324
  }
325
325
  /**
326
- * Cognito supported federated identities public providers.
327
- * @see https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html for more information.
326
+ * Cognito built in identity providers.
328
327
  */
329
- export declare enum IdentityProvider {
330
- Cognito = "COGNITO",
331
- Google = "Google",
332
- Facebook = "Facebook",
333
- Amazon = "LoginWithAmazon",
334
- Apple = "SignInWithApple"
335
- }
328
+ export declare const IdentityProvider: {
329
+ Cognito: string;
330
+ Google: string;
331
+ Facebook: string;
332
+ Apple: string;
333
+ };
336
334
  export interface AuthenticationResult {
337
335
  AccessToken: string;
338
336
  ExpiresIn: number;
@@ -770,7 +768,7 @@ export declare class CognitoClient {
770
768
  *
771
769
  * @throws {Error}
772
770
  */
773
- generateOAuthSignInUrl(identityProvider?: IdentityProvider): Promise<{
771
+ generateOAuthSignInUrl(identityProvider?: string): Promise<{
774
772
  url: string;
775
773
  state: string;
776
774
  pkce: string;
@@ -29,17 +29,14 @@ export var ServiceTarget;
29
29
  ServiceTarget["ListWebAuthnCredentials"] = "ListWebAuthnCredentials";
30
30
  })(ServiceTarget || (ServiceTarget = {}));
31
31
  /**
32
- * Cognito supported federated identities public providers.
33
- * @see https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html for more information.
32
+ * Cognito built in identity providers.
34
33
  */
35
- export var IdentityProvider;
36
- (function (IdentityProvider) {
37
- IdentityProvider["Cognito"] = "COGNITO";
38
- IdentityProvider["Google"] = "Google";
39
- IdentityProvider["Facebook"] = "Facebook";
40
- IdentityProvider["Amazon"] = "LoginWithAmazon";
41
- IdentityProvider["Apple"] = "SignInWithApple";
42
- })(IdentityProvider || (IdentityProvider = {}));
34
+ export const IdentityProvider = {
35
+ Cognito: 'COGNITO',
36
+ Google: 'Google',
37
+ Facebook: 'Facebook',
38
+ Apple: 'SignInWithApple'
39
+ };
43
40
  export function adaptExpiresIn(auth) {
44
41
  // Cognito returns expiresIn in seconds, but we want it in milliseconds from now
45
42
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vardario/cognito-client",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": "Sahin Vardar",