2024 使用 NestJS - 實作第三方 OAuth 授權登入服務

Avatar of Mark.
Avatar of Mark.

2024 使用 NestJS - 實作第三方 OAuth 授權登入服務

Professional EC website development | SEO | Integrate AI
Taipei City, Taiwan

使用 NestJS - 實作第三方 OAuth 授權登入服務

前言

做了簡易的 OAuth 練習,就順便學了 NestJS (Node)後端框及 Prisma (ORM) 。


目的

開放授權(OAuth)是一個開放授權標準,廣泛用於社群授權登入,讓第三方網站可以不用取得使用者帳密,就能存取資源服務器資源。

此次採用的技術架構是

  • 前端(電商網站) - (Next.JS、Eslint、Pritter、React、Redux toolkit) - 程式碼
  • 後端(OAuth 服務) -( Nest JS、Mysql、Prisma 、 Swagger 、 class-validator做資料驗證、並用Guard 做JWT的API驗證) - 程式碼
  • 資料庫 MYsql

Demo

佈署環境

  • 使用Powerhsell 佈署到Nas
  • GCP 反向代理 + 個人 Nas 伺服器

測試

  • Jest
  • Rest Client

實作細節: 連結

做了簡易的 OAuth 練習,就順便學了 NestJS (Node)後端框及 Prisma (ORM) 。 實作細節 https://blog.markkulab.net/practice-oauth-with-nestjs/
Avatar of the user.
Please login to comment.

Đã đăng: thg 11 17 2024
49
1
0

Công cụ

nextjs
Next.js
nodejs
Node.js

Chia sẻ