sergiodxa / remix-auth

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

Allow chaining with `Authenticator#use` #258

Closed lifeiscontent closed 11 months ago

lifeiscontent commented 11 months ago

this change allows for chaining to happen while resolving the proper type.

example:

previously:

export const authenticator = new Authenticator<SessionData["user"]>(
  sessionStorage,
  {
    sessionKey,
  }
);

authenticator.use(auth0Strategy);

now:

export const authenticator = new Authenticator<SessionData["user"]>(
  sessionStorage,
  {
    sessionKey,
  }
).use(auth0Strategy); // previously doing this would result in a type error due to user resolving to `unknown`
lifeiscontent commented 7 months ago

@sergiodxa when will these changes be released?