Skip to content

单点登录操作流程

  1. 首先接入星重私有NPM仓库

    bash
    npm config set registry=https://nexus.starcharge.com/repository/npm-public/
    npm config set always-auth true
  2. 登录npm仓库并设置凭证

    bash
    npm login
  3. 输入用户名,密码以及自己的企业邮箱

    bash
    用户名: 
    npm-user
    密码: 
    wb123456
  4. 下载sso工具包

    bash
    npm i @star-charge/auth-utils
  5. 配置host映射地址

    我是直接修改的hosts文件,因为电脑没有权限,需要使用echo对文档直接读写

    文件路径 C:\Windows\System32\drivers\etc\hosts

  6. 后续启动项目,就需要使用配好的路径

参考文档

接入星充私有NPM仓库(nexus)

sso映射host本地开发教程

sso单点登录接入指引