Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@authing/guard

Package Overview
Dependencies
Maintainers
1
Versions
295
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@authing/guard - npm Package Compare versions

Comparing version 1.3.2 to 1.4.0

dist/demo.html

4

package.json
{
"name": "@authing/guard",
"version": "1.3.2",
"version": "1.4.0",
"repository": {

@@ -21,3 +21,3 @@ "type": "git",

"@authing/sso": "^1.0.1",
"authing-js-sdk": "2.9.1",
"authing-js-sdk": "^2.20.0-alpha",
"axios": "^0.18.0",

@@ -24,0 +24,0 @@ "vue": "^2.6.6",

@@ -24,3 +24,4 @@ /* jshint esversion: 6 */

PHONE: "请输入手机号",
PHONE_CODE: "4 位验证码"
PHONE_CODE: "4 位验证码",
MFA_CODE: "请输入动态口令"
},

@@ -102,2 +103,3 @@ $authing = this;

opts.placeholder.phoneCode || PLACEHOLDER_TEXT.PHONE_CODE;
opts.placeholder.MFACode = opts.placeholder.MFACode || PLACEHOLDER_TEXT.MFA_CODE;
} else {

@@ -112,3 +114,4 @@ opts.placeholder = {

phone: PLACEHOLDER_TEXT.PHONE,
phoneCode: PLACEHOLDER_TEXT.PHONE_CODE
phoneCode: PLACEHOLDER_TEXT.PHONE_CODE,
MFACode: PLACEHOLDER_TEXT.MFA_CODE
};

@@ -115,0 +118,0 @@ }

@@ -7,3 +7,3 @@ /* jshint esversion: 6 */

import Logout from './views/Logout.vue'
import Profile from './views/Profile.vue'
import Login from './views/login/index.vue';

@@ -41,4 +41,9 @@

component: ErrorPage,
},
{
path: '/profile',
name: 'profile',
component: Profile,
}
]
});

@@ -8,3 +8,3 @@ const state = {

signUpPassword: "",
forgetPasswordEmail: "",

@@ -15,3 +15,20 @@ forgetPasswordVerifyCode: "",

userInfo: {},
isLogged: false
isLogged: false,
// 用于登录过程中,碰到需要输入 MFA 时,存储下上一步的用户名和密码
loginFormStash: {
email: '',
password: '',
MFACode: '',
verifyCode: '',
username: ''
},
// 用于社会化登录过程中,碰到需要输入 MFA 时,存储 unionid 以便再次登录
loginOpt: {
unionid: '',
email: '',
lastIP: ''
},
// 如果因 MFA 问题导致登录流程终端,记录一下当前是用户名密码登录还是社会化登录 UP social
loginType: ''
};

@@ -31,3 +48,6 @@ const getters = {

forgetPasswordEmail: state => state.forgetPasswordEmail,
forgetPasswordVerifyCode: state => state.forgetPasswordVerifyCode
forgetPasswordVerifyCode: state => state.forgetPasswordVerifyCode,
loginFormStash: state => state.loginFormStash,
loginOpt: state => state.loginOpt,
loginType: state => state.loginType
};

@@ -123,2 +143,15 @@ const actions = {

state.isLogged = isLogged;
},
setLoginFormStash(state, { email, password, verifyCode, MFACode, username }) {
state.loginFormStash = {
email, password, verifyCode, MFACode, username
}
},
setLoginOpt(state, { email, unionid, lastIP }) {
state.loginOpt = {
email, unionid, lastIP
}
},
setLoginType(state, { loginType }) {
state.loginType = loginType
}

@@ -125,0 +158,0 @@ };

@@ -10,3 +10,4 @@ const pageVisibilities = [

"phoneCodeLogin",
"LDAPLogin"
"LDAPLogin",
"MFACode"
];

@@ -29,2 +30,3 @@ const state = {

signUp: false,
MFACode: false,

@@ -53,2 +55,3 @@ // -----------------------------

loginVerifyCode: state => state.loginVerifyCode,
MFACode: state => state.MFACode,

@@ -96,2 +99,5 @@ forgetPassword: state =>

},
gotoMFACode({commit}) {
commit("turnOnPage", { page: "MFACode", keepMessage: true });
},
turnOnPage({ commit }, { page }) {

@@ -133,5 +139,6 @@ // commit("removeGlobalMsg");

// },
turnOnPage(state, { page }) {
turnOnPage(state, { page, keepMessage }) {
// 切换页面时删除 GlobalMessage
this.dispatch("data/showGlobalMessage", { type: "", message: "" });
if(!keepMessage)
this.dispatch("data/showGlobalMessage", { type: "", message: "" });
// page 是 pageVisibilities 中的一个字符串

@@ -149,2 +156,3 @@ state.pageStack.push(

goBack(state) {
this.dispatch("data/showGlobalMessage", { type: "", message: "" });
let prev = state.pageStack.pop();

@@ -151,0 +159,0 @@ pageVisibilities.map(item => {

@@ -13,2 +13,3 @@ module.exports = {

'^/authorize': {
// target: 'https://sso.authing.cn/sso',
target: 'http://localhost:5556/sso',

@@ -18,2 +19,3 @@ changeOrigin: true

'^/oauth': {
// target: 'https://sso.authing.cn/',
target: 'http://localhost:5556/',

@@ -20,0 +22,0 @@ changeOrigin: true

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc