Instagram 供應商
資源
設定
回呼 URL
https://example.com/api/auth/callback/instagram
環境變數
AUTH_INSTAGRAM_ID
AUTH_INSTAGRAM_SECRET
設定
/auth.ts
import NextAuth from "next-auth"
import Instagram from "next-auth/providers/instagram"
export const { handlers, auth, signIn, signOut } = NextAuth({
providers: [Instagram],
})
注意事項
- Instagram API 不會傳回電子郵件地址。
- Instagram 要求在您的 Facebook 應用程式中設定回呼 URL,而 Facebook 要求您使用 https,即使是 localhost 也一樣。為了做到這一點,您需要在您的 localhost 上新增 SSL,或使用代理伺服器,例如ngrok。