Skip to content
Migrating from NextAuth.js v4? Read our migration guide.

Instagram Provider

Resources

Setup

Callback URL

https://example.com/api/auth/callback/instagram

Environment Variables

AUTH_INSTAGRAM_ID
AUTH_INSTAGRAM_SECRET

Configuration

/auth.ts
import NextAuth from "next-auth"
import Instagram from "next-auth/providers/instagram"
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [Instagram],
})

Notes

  • Email address is not returned by the Instagram API.
  • Instagram requires a callback URL to be configured in your Facebook app and Facebook requires you to use https even for localhost. In order to do that, you either need to add an SSL to your localhost or use a proxy such as ngrok.
Auth.js © Balázs Orbán and Team - 2024