Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(provider): new strategy for auth0 #245

Merged
merged 2 commits into from
Sep 30, 2024
Merged

feat(provider): new strategy for auth0 #245

merged 2 commits into from
Sep 30, 2024

Conversation

yeshamavani
Copy link
Contributor

@yeshamavani yeshamavani commented Sep 24, 2024

passport based strategy

GH-244

Description

Added a new passport based strategy for auth0 authentication.

Fixes #244

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Intermediate change (work in progress)

How Has This Been Tested?

Used this package in sourceloop based authentication service

Checklist:

  • Performed a self-review of my own code
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Any dependent changes have been merged and published in downstream modules

passReqToCallback?: false | undefined;
}
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
export type VerifyCallback = (err?: any, user?: any, info?: any) => void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isnt this available in passport strategy typings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no not explicitly

@@ -120,6 +121,16 @@ export namespace VerifyFunction {
req?: Request,
): Promise<T | null>;
}
export interface Auth0Fn<T = IAuthUser> extends GenericAuthFn<T> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We create interface for each strategy based on its verify function type

Copy link
Collaborator

@samarpanB samarpanB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls check the comments

Copy link

@yeshamavani yeshamavani merged commit cd80523 into master Sep 30, 2024
4 checks passed
@yeshamavani yeshamavani deleted the GH-244 branch September 30, 2024 06:44
@yeshamavani
Copy link
Contributor Author

🎉 This PR is included in version 12.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Authentication using Auth0 strategy
2 participants