sergiodxa / remix-auth

Simple Authentication for Remix
https://sergiodxa.github.io/remix-auth/
MIT License
1.99k stars 110 forks source link

Consider shipping each strategy separately #52

Closed edmundhung closed 2 years ago

edmundhung commented 2 years ago

While I am working on #49, it feels like there will always be case that works only on some environments. It might requires node package that cannot polyfill or depends on package specific to certain platforms.

All strategies are bundled together at the moment. But maybe it worth consider shipping them separately: Either (1) As independent package or (2) As subfolders (i.e. import { LocalStrategy } from "remix-auth/strategies/LocalStrategy";

sergiodxa commented 2 years ago

From v2.4.0 you can do:

import { Authenticator } from "remix-auth/build/authenticator"
import { LocalStrategy } from "remix-auth/build/strategies/local"

Treat it as a non documented behavior from now, in a future version I will remove the build from the path.