Bungie 供應商
資源
設定
回呼 URL
https://example.com/api/auth/callback/bungie
環境變數
AUTH_BUNGIE_ID
AUTH_BUNGIE_SECRET
AUTH_BUNGIE_API_KEY
組態
導覽至 https://www.bungie.net/en/Application 並填寫所需的詳細資訊
- 應用程式名稱
- 應用程式狀態
- 網站
- OAuth 用戶端類型
- 機密
- 重新導向 URL
- 範圍
存取您的 Bungie.net 通知、成員資格和最近的 Bungie.Net 論壇活動等項目。
- 來源標頭
/auth.ts
import NextAuth from "next-auth";
import Bungie from "next-auth/providers/boxyhq-saml";
export const { handlers, auth, signIn, signOut } = NextAuth({
providers: [
Bungie({
clientId: AUTH_BUNGIE_ID
clientSecret: AUTH_BUNGIE_SECRET
headers: { "X-API-Key": AUTH_BUNGIE_API_KEY }
}),
],
});
注意事項
- Bungie 要求所有用戶端都使用 https。
- Bungie 不允許主機名稱
localhost
,因此對於本機開發,您必須使用127.0.0.1
,例如