Closed Yukaii closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
zuzugo | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Mar 2, 2023 at 3:31PM (UTC) |
😎 Merged successfully (details).
昨天搞錯了,Slack 的 OAuth 有兩種資源,一個是 app installation 的,一種是 User 的。User 的部分,NextAuth 已經幫忙處裡了,就照舊就好;Installation 的部分,就整合 bolt 來做,設定另一個 OAuth Callback endpoint,也沒問題。發生的時序會是:
/trunk merge
需要解決 bolt 的 prisma installation 和 NextAuth 的整合
Bolt 的 InstallerProvider
#handleCallback
用 NextAuth 的 OAuthChecks hooks 來截取必要資訊暴露資訊太少,在 https://github.com/panva/node-openid-client/blob/d3642296a08da05c1c2ecce8a3145b2096df20f4/types/index.d.ts#L161-L167 ,真是一層一層疊起來欸好讚幹https://github.com/vercel-labs/slacker/blob/main/pages/api/auth.ts#L16
Slacker 也是在 OAuth flow response 直接處裡 installation(當然是 MVP 的方式)。如果我們要有完整 installation 資訊(包含 webhook 那些),勢必就要重新實作
@slack/oauth
裡面的handleCallback
裡面的部分內容;OAuth response 應該是可以從 next