@ts-core/oauth 3.1.12 → 3.1.13
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/tg/TgAuth.js +2 -1
- package/esm/tg/TgAuth.js +2 -1
- package/package.json +1 -1
package/cjs/tg/TgAuth.js
CHANGED
|
@@ -16,8 +16,9 @@ const PopUpBase_1 = require("../PopUpBase");
|
|
|
16
16
|
const _ = require("lodash");
|
|
17
17
|
class TgAuth extends common_1.LoggerWrapper {
|
|
18
18
|
static getUser(locationHash) {
|
|
19
|
+
let { user } = TgAuth.getInitDataUnsafe(locationHash);
|
|
19
20
|
let item = new TgUser_1.TgUser();
|
|
20
|
-
item.parse(
|
|
21
|
+
item.parse(JSON.parse(user));
|
|
21
22
|
item.raw = TgAuth.getInitData(locationHash);
|
|
22
23
|
return item;
|
|
23
24
|
}
|
package/esm/tg/TgAuth.js
CHANGED
|
@@ -13,8 +13,9 @@ import { PopUpBase } from "../PopUpBase";
|
|
|
13
13
|
import * as _ from 'lodash';
|
|
14
14
|
export class TgAuth extends LoggerWrapper {
|
|
15
15
|
static getUser(locationHash) {
|
|
16
|
+
let { user } = TgAuth.getInitDataUnsafe(locationHash);
|
|
16
17
|
let item = new TgUser();
|
|
17
|
-
item.parse(
|
|
18
|
+
item.parse(JSON.parse(user));
|
|
18
19
|
item.raw = TgAuth.getInitData(locationHash);
|
|
19
20
|
return item;
|
|
20
21
|
}
|