Skip to content
Migrating from NextAuth.js v4? Read our migration guide.
Getting Started
Providers
Foursquare

Foursquare Provider

Resources

Setup

Callback URL

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

Environment Variables

AUTH_FOURSQUARE__ID
AUTH_FOURSQUARE_SECRET

Configuration

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

Notes

  • Foursquare requires an additional apiVersion parameter in YYYYMMDD format, which essentially states “I’m prepared for API changes up to this date”.
Auth.js © Balázs Orbán and Team - 2024