Skip to content

v1.0.0 multiple auth provider support 馃帀

Compare
Choose a tag to compare
@Swizec Swizec released this 05 Dec 17:32
· 137 commits to master since this release

馃コ useAuth now supports multiple auth providers 馃コ

THE question everyone's been asking: Can I use anything other than Auth0? Now you can!

Starting with Auth0 and Netlify Identity. Fully backwards compatible so upgrading to v1.0.0, you don't have to change anything.

New configuration support

<AuthProvider> is deprecated. We now have <AuthConfig>

Render anywhere in your tree, ideally close to the top, and useAuth handles the rest. We're now using XState behind the scenes 鈥撀爊o more context providers. AuthConfig is not a wrapper, but can be if you prefer.

image

image

Multiple auth providers

An abstraction layer provides an interface to deal with different providers. Add a new wrapper to src/providers/* and we can support new providers.

Tested with Netlify Identity and Auth0 so far. Docs for creating new wrappers coming soon.

The goal is to add every popular auth provider.