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

w-web-sso

v1.1.4

Published

A web service for SSO.

Downloads

3,534

Readme

w-web-sso

A web service for SSO.

language npm version license npm download npm download jsdelivr download

Documentation

To view documentation or get support, visit docs.

Upgrade Notes

Upgrading from 1.0.3x / 1.0.5x

Settings (啟動契約): 舊版 settings 原封不動即可啟動——新增之設定鍵皆有內建預設:

  • allowUserRegistration 預設 false(自助註冊為 opt-in 新功能,明確設 true 才啟用;正式機須給 verifyBaseUrl 使驗證信連結可自外部連通)。siteUrl 為選填(目前保留供未來使用,尚無功能讀取,不強制提供)。
  • passwordPolicy 未給採程式內建預設密碼政策(同套件自帶 settings.json 之預設組);有給則以內建預設為底淺層 merge——可只給欲調整之欄位(如 { minLength: 10 }),未給欄位沿用內建(黑名單等隨套件更新),merge 後逐欄驗證(給了就必須給對)。
  • 信件文字鍵全數繼續生效(各欄位逐語系物件,語意同舊版):chpwEmTitle / chpwEmContent(變更密碼通知信,{sender}/{name} 置換符)、regVerifyEmTitle / regVerifyEmContent(註冊驗證信,{sender}/{name}/{verifyUrl} 置換符);另新增 resetPwEmTitle / resetPwEmContent(重設密碼通知信,{sender}/{name}/{account}/{newPassword} 置換符)與 verifyEmailResultContent(驗證結果頁,{title}/{message} 置換符);2026-09-15 起結果頁之三則訊息 userRegistrationVerifySuccess / verifyEmailAlreadyVerified / verifyEmailInvalidToken 亦可以同名 settings 鍵逐語系覆寫(代入 {message};部署方須點名自家系統時於此覆寫,不改套件內建)。各值可直接給文字,亦可給檔案路徑(絕對或基於啟動路徑之相對,檔案存在即讀檔作為內容,不存在則原樣視為文字)。既有客製不需任何搬移;未給時採內建語系文字(結果頁採內建模板,另可用 pathTemplate 指定自訂結果頁模板資料夾)。套件自帶 settings.json 已含全部鍵與預設文字可直接參考。
  • settings 內 salt 為伺服器端 pepper(範例值 '{salt}',正式部署請自行改為高熵字串;亦可以環境變數 SALT 覆寫);套件不檢查其內容。

API (授權收緊, 1.0.5x 起): /api/getSsoUserInfor 與 /api/getSsoUsersList 由「任何有效 token」收緊為須 admin token 或 app token(isApp='y')。以 app token 做系統介接者不受影響;若既有整合以一般使用者 token 呼叫這兩支,請改用 app token。錯誤訊息字串已改為 i18n key(呼叫端請以 state==='success' 判斷成敗,勿比對錯誤字串)。

Database (資料契約, 1.0.5x 起之破壞性變更): 密碼雜湊改為 scrypt:{saltHex}:{hashHex} 自描述格式且不相容舊格式,並新增 timeVerified 必填欄位(為空視為未完成信箱驗證、拒絕登入)。舊 DB 之使用者(含 admin)升級後將全數無法登入——請重建 DB 並重匯入使用者資料(以新版 hashPassword 產生密碼並補 timeVerified),或自行撰寫一次性遷移(重設密碼+補 timeVerified+可標 isForceChangePw='y' 要求使用者改密)。

Installation

Using npm(ES6 module):

npm i w-web-sso

Example for server:

Link: [dev source code]