@ts-core/oauth 3.0.6 → 3.0.7

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/cjs/OAuthBase.js CHANGED
@@ -17,8 +17,8 @@ class OAuthBase extends common_1.LoggerWrapper {
17
17
  super(logger);
18
18
  this.applicationId = applicationId;
19
19
  this.window = window;
20
- this.popUpWidth = 640;
21
- this.popUpHeight = 480;
20
+ this.popUpWidth = 430;
21
+ this.popUpHeight = 520;
22
22
  this.checkPopUp = () => {
23
23
  if (_.isNil(this.popUp) || this.popUp.closed) {
24
24
  this.close();
@@ -65,7 +65,6 @@ class OAuthBase extends common_1.LoggerWrapper {
65
65
  }
66
66
  getUrlParams() {
67
67
  let item = new URLSearchParams();
68
- item.append('display', 'popup');
69
68
  item.append('client_id', this.applicationId);
70
69
  item.append('redirect_uri', this.redirectUri);
71
70
  item.append('response_type', this.responseType);
package/cjs/ma/MaAuth.js CHANGED
@@ -17,8 +17,6 @@ const _ = require("lodash");
17
17
  class MaAuth extends OAuthBase_1.OAuthBase {
18
18
  constructor(logger, applicationId, window) {
19
19
  super(logger, applicationId, window);
20
- this.popUpWidth = 480;
21
- this.popUpHeight = 520;
22
20
  this.urlParams.set('scope', 'userinfo');
23
21
  }
24
22
  getUrlParams() {
@@ -1,8 +1,6 @@
1
- import { ILogger } from "@ts-core/common";
2
1
  import { IOAuthDto, IOAuthToken, OAuthBase } from "../OAuthBase";
3
2
  import { YaUser } from "./YaUser";
4
3
  export declare class YaAuth<T extends YaUser = YaUser> extends OAuthBase<T> {
5
- constructor(logger: ILogger, applicationId: string, window?: Window);
6
4
  protected getUrl(): string;
7
5
  getProfile(token: string): Promise<T>;
8
6
  getTokenByCode(dto: IOAuthDto, secret: string): Promise<IOAuthToken>;
package/cjs/ya/YaAuth.js CHANGED
@@ -15,11 +15,6 @@ const OAuthBase_1 = require("../OAuthBase");
15
15
  const YaUser_1 = require("./YaUser");
16
16
  const _ = require("lodash");
17
17
  class YaAuth extends OAuthBase_1.OAuthBase {
18
- constructor(logger, applicationId, window) {
19
- super(logger, applicationId, window);
20
- this.popUpWidth = 480;
21
- this.popUpHeight = 520;
22
- }
23
18
  getUrl() {
24
19
  return `https://oauth.yandex.ru/authorize?${this.getUrlParams().toString()}`;
25
20
  }
package/esm/OAuthBase.js CHANGED
@@ -14,8 +14,8 @@ export class OAuthBase extends LoggerWrapper {
14
14
  super(logger);
15
15
  this.applicationId = applicationId;
16
16
  this.window = window;
17
- this.popUpWidth = 640;
18
- this.popUpHeight = 480;
17
+ this.popUpWidth = 430;
18
+ this.popUpHeight = 520;
19
19
  this.checkPopUp = () => {
20
20
  if (_.isNil(this.popUp) || this.popUp.closed) {
21
21
  this.close();
@@ -62,7 +62,6 @@ export class OAuthBase extends LoggerWrapper {
62
62
  }
63
63
  getUrlParams() {
64
64
  let item = new URLSearchParams();
65
- item.append('display', 'popup');
66
65
  item.append('client_id', this.applicationId);
67
66
  item.append('redirect_uri', this.redirectUri);
68
67
  item.append('response_type', this.responseType);
package/esm/ma/MaAuth.js CHANGED
@@ -14,8 +14,6 @@ import * as _ from 'lodash';
14
14
  export class MaAuth extends OAuthBase {
15
15
  constructor(logger, applicationId, window) {
16
16
  super(logger, applicationId, window);
17
- this.popUpWidth = 480;
18
- this.popUpHeight = 520;
19
17
  this.urlParams.set('scope', 'userinfo');
20
18
  }
21
19
  getUrlParams() {
@@ -1,8 +1,6 @@
1
- import { ILogger } from "@ts-core/common";
2
1
  import { IOAuthDto, IOAuthToken, OAuthBase } from "../OAuthBase";
3
2
  import { YaUser } from "./YaUser";
4
3
  export declare class YaAuth<T extends YaUser = YaUser> extends OAuthBase<T> {
5
- constructor(logger: ILogger, applicationId: string, window?: Window);
6
4
  protected getUrl(): string;
7
5
  getProfile(token: string): Promise<T>;
8
6
  getTokenByCode(dto: IOAuthDto, secret: string): Promise<IOAuthToken>;
package/esm/ya/YaAuth.js CHANGED
@@ -12,11 +12,6 @@ import { OAuthBase } from "../OAuthBase";
12
12
  import { YaUser } from "./YaUser";
13
13
  import * as _ from 'lodash';
14
14
  export class YaAuth extends OAuthBase {
15
- constructor(logger, applicationId, window) {
16
- super(logger, applicationId, window);
17
- this.popUpWidth = 480;
18
- this.popUpHeight = 520;
19
- }
20
15
  getUrl() {
21
16
  return `https://oauth.yandex.ru/authorize?${this.getUrlParams().toString()}`;
22
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ts-core/oauth",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "Classes and utils for oauth",
5
5
  "main": "./cjs/public-api.js",
6
6
  "module": "./esm/public-api.js",