npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@logto/connector-xiaomi

v1.2.3

Published

Xiaomi web connector implementation.

Downloads

2,356

Readme

小米社交连接器

小米社交登录 Logto 官方连接器 中文文档

目录

小米是一家全球知名的科技公司,提供包括智能手机、智能家居等在内的多种产品和服务。本连接器可以帮助终端用户使用小米账号登录你的应用。

开始上手

  1. 小米开放平台创建开发者账号
  2. 访问小米帐号服务
  3. 创建一个新应用(如果还没有)

配置小米 OAuth 应用

  1. 访问小米帐号服务
  2. 配置 OAuth 设置:
    • 打开要用于登录的应用,点击「回调地址」(如果没有编辑过回调地址,会显示为「启用」)
    • 添加授权回调地址: ${your_logto_origin}/callback/${connector_id}
    • connector_id 可以在 Logto 管理控制台连接器详情页顶部找到
  3. 从应用详情页获取 AppIDAppSecret
  4. 将第 3 步获取的值填入 Logto 管理控制台的 clientIdclientSecret 字段
  5. 可选配置:
    • skipConfirm: 在用户已登录小米账号的情况下,是否跳过小米授权确认页面,默认为 false

权限范围说明

默认情况下,连接器请求以下权限:

  • 1: 读取用户资料

可配置的权限范围:

| 权限值 | 描述 | API 接口 | |-------|------|----------| | 1 | 获取用户资料 | user/profile | | 3 | 获取用户 open_id | user/openIdV2 | | 1000 | 获取小米路由器信息 | 路由器 | | 1001 | 访问所有小米路由器信息 | 路由器 | | 2001 | 访问小米云日历 | 小米云 | | 2002 | 访问小米云闹钟 | 小米云 | | 6000 | 使用米家智能家居服务 | 米家 | | 6002 | 添加第三方设备到米家 | 米家 | | 6003 | Alexa 控制小米设备 | 米家 | | 6004 | 第三方服务访问小米设备 | 米家 | | 7000 | 关注黄页服务号 | 小米云 | | 11000 | 获取小米云相册 | 小米云 | | 12001 | 保存应用数据到小米云 | 小米云 | | 12005 | 使用健康心电图服务 | 健康 | | 16000 | 获取小米卡包卡券 | app/get_pass | | 20000 | 启用小爱智能语音服务 | 小爱 | | 40000 | 启用云端 AI 服务 | 内部使用 |

可以通过空格分隔配置多个权限范围,例如: 1 3 6000

测试小米连接器

大功告成!别忘了在登录体验中启用该连接器。

参考