bunadmin-auth-buncms
Advanced tools
Comparing version 1.1.3-beta.6 to 1.1.3-beta.7
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.6", | ||
"version": "1.1.3-beta.7", | ||
"license": "Apache-2.0", | ||
@@ -19,3 +19,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "5d5588afaf12d67638e44ba4e19e679fe1410185" | ||
"gitHead": "5f5ebc4c002e579b69fee23b5dc3a98a1f652624" | ||
} |
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
49371
747