hezhii / Nodejs Sso Example
🌰 一个基于 Node.js 实现的单点登录实例。
Stars: ✭ 40
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Nodejs Sso Example
Cas Configserver Overlay
Generic CAS Spring Cloud Configuration Server WAR overlay
Stars: ✭ 28 (-30%)
Mutual labels: sso
Product Is
Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
Stars: ✭ 435 (+987.5%)
Mutual labels: sso
Jpproject.identityserver4.adminui
🔧 ASP.NET Core 3 & Angular 8 Administration Panel for 💞IdentityServer4 and ASP.NET Core Identity
Stars: ✭ 717 (+1692.5%)
Mutual labels: sso
Oauth2 Server
spring boot (springboot 2+) oauth2 server sso 单点登录 认证中心 JWT,独立部署,用户管理 客户端管理
Stars: ✭ 363 (+807.5%)
Mutual labels: sso
Jbone
jbone基于Spring Cloud框架开发,旨在为中小企业提供稳定的微服务解决方案,为开发人员提供基础开发骨架,jbone包含微服务中所有常用组件,例如注册中心、服务管理、服务监控、JVM监控、内存分析、调用链跟踪、API网关等等。业务功能包括系统权限的统一管理、单点登录、CMS、电商平台、工作流平台、支付平台等等。
Stars: ✭ 961 (+2302.5%)
Mutual labels: sso
Fw Cloud Framework
基于springcloud全家桶开发分布式框架(支持oauth2认证授权、SSO登录、统一下单、微信公众号服务、Shardingdbc分库分表、常见服务监控、链路监控、异步日志、redis缓存等功能),实现基于Vue全家桶等前后端分离项目工程
Stars: ✭ 717 (+1692.5%)
Mutual labels: sso
Hello Sso Jwt Resource
Single Sign On (SSO) Example with JSON Web Token (JWT), Spring Boot
Stars: ✭ 10 (-75%)
Mutual labels: sso
Spring Boot Security Saml Sample
SBS3 — A sample SAML 2.0 Service Provider built on Spring Boot.
Stars: ✭ 469 (+1072.5%)
Mutual labels: sso
Authelia
The Single Sign-On Multi-Factor portal for web apps
Stars: ✭ 11,094 (+27635%)
Mutual labels: sso
Jso
Easy to use OAuth 2.0 javascript library for use in your javascript application.
Stars: ✭ 830 (+1975%)
Mutual labels: sso
Aws Google Auth
Provides AWS STS credentials based on Google Apps SAML SSO auth (what a jumble!)
Stars: ✭ 428 (+970%)
Mutual labels: sso
React Samlify
🔐Sample samlify application with React, TypeScript and Webpack
Stars: ✭ 31 (-22.5%)
Mutual labels: sso
Tailscale
The easiest, most secure way to use WireGuard and 2FA.
Stars: ✭ 6,157 (+15292.5%)
Mutual labels: sso
Dutsso
快速登录大连理工大学统一身份认证系统(SSO)的Python模块,可轻松实现成绩提醒、抢课、玉兰卡信息、个人信息查询等功能。
Stars: ✭ 32 (-20%)
Mutual labels: sso
Node.js 单点登录实例
一个基于 Express 实现的 Node.js 单点登录实例,核心思路是通过重定向到统一的认证中心进行登录验证。
不过,通过研究淘宝 & 天猫、京东和谷歌的单点登录机制发现,他们都是通过跨域设置 cookie 来实现的,其中淘宝和京东通过 JSONP 设置,谷歌通过重定向方式设置,计划日后通过这样的方式再实现一个例子。
如何测试
运行 Demo 需要先安装 Node.js 和 Yarn。
- 克隆仓库并安装依赖:
$ git clone https://github.com/hezhii/nodejs-sso-example.git
$ cd nodejs-sso-example
$ yarn install
- 启动服务
启动服务前先修改本地的 hosts 文件,macOS 位于 /private/etc/hosts
,windows 位于 C:\Windows\System32\drivers\etc\hosts
。
在文件最后加上一行:127.0.0.1 www.a.com www.b.com passport.com
然后分别启动三个服务:
$ cd passport
$ node app.js
$ cd ../system
$ PORT=8081 SERVER_NAME=a node app.js
$ PORT=8082 SERVER_NAME=b node app.js
- 测试
打开浏览器访问 www.a.com:8081
,发现会被重定向到 passport.com
,输入用户名和密码后登录。
接着新开一个窗口访问 www.b.com:8082
,发现不需要登录直接可以访问。
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].