Open
Description
I am not sure if it's only with me or everyone has a problem with the package. My function never gets called? Is there a problem with the package?
This function never gets called:-
async (accessToken, refreshToken, userProfile, cb) => {
console.log(userProfile);
const profile = userProfile as unknown as UserProfile;
let user = await getRepository(User).findOne({
where: { githubId: profile.id },
});
My code:-
new GitHubStrategy(
{
clientID: process.env.ID,
clientSecret: process.env.SECRET,
callbackURL: "http://localhost:4000/graphql",
},
async (accessToken, refreshToken, userProfile, cb) => {
console.log(userProfile);
const profile = userProfile as unknown as UserProfile;
let user = await getRepository(User).findOne({
where: { githubId: profile.id },
});
if (!user) {
user = await createUser({
username: profile.username || "",
email: profile.emails as unknown as string,
githubId: profile.id,
pictureUrl: profile._json.avatar_url,
});
}
cb(null, {
user,
accessToken,
refreshToken,
});
}
)
);```
Metadata
Metadata
Assignees
Labels
No labels