@sunggang/ui-lib 0.3.36 → 0.3.37
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/index.esm2.js
CHANGED
|
@@ -78644,7 +78644,7 @@ var LiffProvider = function(param) {
|
|
|
78644
78644
|
}();
|
|
78645
78645
|
var accountLogin = function() {
|
|
78646
78646
|
var _ref = _async_to_generator(function(username, password) {
|
|
78647
|
-
var _response_data, _response_data1,
|
|
78647
|
+
var response, _response_data, _response_data1, token, tokenType, finalToken, err;
|
|
78648
78648
|
return _ts_generator(this, function(_state) {
|
|
78649
78649
|
switch(_state.label){
|
|
78650
78650
|
case 0:
|
|
@@ -78666,6 +78666,10 @@ var LiffProvider = function(param) {
|
|
|
78666
78666
|
];
|
|
78667
78667
|
case 1:
|
|
78668
78668
|
response = _state.sent();
|
|
78669
|
+
if (!(response === null || response === void 0 ? void 0 : response.status)) return [
|
|
78670
|
+
3,
|
|
78671
|
+
3
|
|
78672
|
+
];
|
|
78669
78673
|
token = response === null || response === void 0 ? void 0 : (_response_data = response.data) === null || _response_data === void 0 ? void 0 : _response_data.access_token;
|
|
78670
78674
|
tokenType = response === null || response === void 0 ? void 0 : (_response_data1 = response.data) === null || _response_data1 === void 0 ? void 0 : _response_data1.token_type;
|
|
78671
78675
|
finalToken = "".concat(tokenType, " ").concat(token);
|
package/package.json
CHANGED
|
@@ -8,6 +8,8 @@ type LiffContextType = {
|
|
|
8
8
|
initializeLiff: () => Promise<void>;
|
|
9
9
|
isFriendship: boolean | null;
|
|
10
10
|
ensureLiffTokenValid: () => Promise<boolean>;
|
|
11
|
+
loginType: string | null;
|
|
12
|
+
accountLogin: (username: string, password: string) => Promise<void>;
|
|
11
13
|
};
|
|
12
14
|
export declare const LiffContext: React.Context<LiffContextType | undefined>;
|
|
13
15
|
export declare const LiffProvider: ({ children, liffId, localStorageKey, checkTokenUrl, loginUrl, accountLoginUrl, memberInfoUrl, openInApp, ignoreCheckAddFriend, ignoreRoute, loginByUser, customerRedirectUrl, inviteCode, handleLoginError, }: {
|