bunadmin-auth-buncms
Advanced tools
Comparing version 1.1.3-beta.10 to 1.1.3-beta.11
import initData from "./utils/initData"; | ||
import users from "./users"; | ||
import signIn from "./sign-in"; | ||
export { initData, users, signIn }; | ||
import SignIn from "./sign-in"; | ||
export { initData, users, SignIn }; | ||
export declare const authResponseKey = "id"; | ||
export declare const authRequestUrl = "/auth/me"; | ||
export declare const authRequestMethod = "POST"; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.authRequestMethod = exports.authRequestUrl = exports.authResponseKey = exports.signIn = exports.users = exports.initData = void 0; | ||
exports.authRequestMethod = exports.authRequestUrl = exports.authResponseKey = exports.SignIn = exports.users = exports.initData = void 0; | ||
var initData_1 = __importDefault(require("./utils/initData")); | ||
@@ -13,5 +13,5 @@ exports.initData = initData_1.default; | ||
var sign_in_1 = __importDefault(require("./sign-in")); | ||
exports.signIn = sign_in_1.default; | ||
exports.SignIn = sign_in_1.default; | ||
exports.authResponseKey = "id"; | ||
exports.authRequestUrl = "/auth/me"; | ||
exports.authRequestMethod = "POST"; |
@@ -10,3 +10,3 @@ import { Values } from "../types"; | ||
} | ||
declare const submitController: ({ t, values, setSubmitting, router }: Props) => Promise<void>; | ||
declare const submitController: ({ t, values, setSubmitting, }: Props) => Promise<void>; | ||
export default submitController; |
@@ -45,5 +45,5 @@ "use strict"; | ||
var submitController = function (_a) { | ||
var t = _a.t, values = _a.values, setSubmitting = _a.setSubmitting, router = _a.router; | ||
var t = _a.t, values = _a.values, setSubmitting = _a.setSubmitting; | ||
return __awaiter(void 0, void 0, void 0, function () { | ||
var res, primary, updated_at, db, asPath, pathArr, redirect, regex, matchStr, isMatch; | ||
var res, primary, updated_at, db; | ||
var _b; | ||
@@ -96,14 +96,4 @@ return __generator(this, function (_c) { | ||
_c.sent(); | ||
asPath = router.asPath; | ||
pathArr = asPath.split("?redirect="); | ||
redirect = pathArr[1] || "/"; | ||
regex = /\//g; | ||
matchStr = redirect.match(regex) || []; | ||
isMatch = matchStr.length === 2; | ||
if (regex && isMatch) { | ||
router.replace(bunadmin_1.DynamicRoute, redirect); | ||
} | ||
else { | ||
router.replace(redirect); | ||
} | ||
// push to origin url | ||
window.location.reload(); | ||
return [3 /*break*/, 8]; | ||
@@ -110,0 +100,0 @@ case 6: |
{ | ||
"name": "bunadmin-auth-buncms", | ||
"version": "1.1.3-beta.10", | ||
"version": "1.1.3-beta.11", | ||
"license": "Apache-2.0", | ||
@@ -19,3 +19,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "8733bed653ab44c92d70025900be87583828cf27" | ||
"gitHead": "0897ae7b9f1af54387e191f1cc5a9ee7b0d3e1f0" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50119
747