Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow chaining with Authenticator#use #258

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

lifeiscontent
Copy link
Contributor

@lifeiscontent lifeiscontent commented Nov 15, 2023

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`

@sergiodxa sergiodxa changed the title Update authenticator.ts Allow chaining with Authenticator#use Nov 15, 2023
@sergiodxa sergiodxa self-assigned this Nov 15, 2023
@sergiodxa sergiodxa added the enhancement New feature or request label Nov 15, 2023
@sergiodxa sergiodxa merged commit 7f0f4bc into sergiodxa:main Nov 15, 2023
@lifeiscontent
Copy link
Contributor Author

@sergiodxa when will these changes be released?

@lifeiscontent lifeiscontent deleted the patch-1 branch April 6, 2024 02:48
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants