Skip to content

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

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

@yeshamavani yeshamavani merged commit cd80523 into master Sep 30, 2024
@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

3 participants