Netlify Auth Providers is an alpha-stage library (v1.0.0-alpha5) for authenticating with Netlify's external OAuth providers. It provides a simple client that handles the authentication flow, token storage, and refresh. As an alpha release, the API is unstable and may change without notice. Key differentiators include direct integration with Netlify's Identity service and minimal configuration required.
npm install netlify-auth-providersVerified import paths — ran on the pinned version, not inferred.
Demonstrates initializing the client, starting OAuth, handling callback, and retrieving token.
Pin to exact version and test each upgrade.
Migrate to netlify-identity-widget for UI integration or use Netlify Identity JS client.
Ensure redirectUri matches the exact page where handleCallback is called.
Implement custom TokenStore that uses cookies or other storage.
Use ES module import syntax (import ... from).
Specify provider in options object (case-sensitive).
Ensure the redirectUri matches exactly what is configured in Netlify dashboard.