Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@alipay/faas-biz-mini-sdk
Advanced tools
@alipay/faas-biz-mini-sdk 可以在小程序端使用 Javascript 访问云开发用户身份服务。
可以通过 npm 安装:
npm i @alipay/faas-biz-mini-sdk
参数:
字段 | 类型 | 必填 | 说明 |
---|---|---|---|
envId | string | 是 | 云开发的 envId |
userPoolUid | string | 是 | 云开发 UserPool 的 UID |
environment | string | 否 | 环境,当前仅支持生产(hz)环境,默认为 hz |
useHttps | boolean | 否 | 是否使用 HTTPS,默认为 true |
UserPool 是在云开发创建出来的,会分配一个 Uid,一般一个应用使用一个 UserPool 即可,云开发也支持创建多个。 示例代码:
import { Auth } from "@alipay/faas-biz-mini-sdk";
const auth = new Auth({
envId: "your-env-id",
userPoolUid: "your-userpool-uid"
});
接口功能:支付宝登录 输入参数:无 返回结果:
字段 | 类型 | 不为空 | 说明 |
---|---|---|---|
user | User | 是 | 用户信息 |
loginType | string | 是 | 登录方式 |
isAlipayAuth | boolean | 是 | 支付宝三方登录 |
示例代码:
import { Auth } from '@alipay/faas-biz-mini-sdk';
const userPoolConfig = {
envId: 'your-env-id',
userPoolUid: 'your-userPool-uid',
};
const auth = new Auth(userPoolConfig);
const alipayAuthProvider = auth.getAlipayAuthProvider();
alipayAuthProvider.login().then(res => {
//登录成功
});
接口功能:获取 HTTP 鉴权头部 输入参数:无 返回结果:
字段 | 类型 | 不为空 | 说明 |
---|---|---|---|
x-faas-context-authorization | string | 是 | 鉴权头部信息 |
示例代码:
import { Auth } from '@alipay/faas-biz-mini-sdk';
const userPoolConfig = {
envId: 'your-env-id',
userPoolUid: 'your-userPool-uid',
};
const auth = new Auth(userPoolConfig);
await auth.getAuthHeader();
接口功能:获取当前登录用户对象 输入参数:无 返回结果:
字段 | 类型 | 不为空 | 说明 |
---|---|---|---|
user | User | 是 | 用户对象 |
示例代码:
import { Auth } from '@alipay/faas-biz-mini-sdk';
const userPoolConfig = {
envId: 'your-env-id',
userPoolUid: 'your-userPool-uid',
};
const auth = new Auth(userPoolConfig);
await auth.getCurrentUser();
接口功能:退出登录 输入参数:无 返回结果:无 示例代码:
import { Auth } from "@alipay/faas-biz-mini-sdk";
const userPoolConfig = {
envId: 'your-env-id',
userPoolUid: 'your-userPool-uid',
};
const auth = new Auth(userPoolConfig);
auth.logout();
FAQs
支付宝云开发业务 SDK(小程序端)
We found that @alipay/faas-biz-mini-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.