Skip to content

callback of passport.use do not fetch correctly user emails #192

@efremolo

Description

@efremolo

the callback function do not fetch the GitHub user emails + do not provide type safety when typed out (need specific casting)

export class GithubAuthenticator {
   constructor(options: StrategyOptions, controller: GithubAuthenticatorProps) {
      passport.use(
         new Strategy(
            options,
            async (
               accessToken: string,
               refreshToken: string,
               profile: Profile // profile.emails DO NOT FETCH,
               done: (err: any, user?: Express.User | false | null) => void,
            ) => {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions