Hi, I wanted to thank you :
- I am working on setting up Github authentication using passport-github2
- Many examples are on the web for pure node JS, very few are there in Typescirpt.
I found one example in your repository, and wanted to thank you about it :)
One question though : I could ot find the source code of the Profile
type, which I suppose is an interface, have I missed it ?
Oh yeah, just found it import { Profile } from 'passport-github2'
Note that you have a small issue :
const verify = (
accessToken: string,
refreshToken: string,
profile: passport_github2.Profile, // type was Profile, but well, I don't have a Profile interface or class
done: OAuth2Strategy.VerifyCallback
): void => {
console.log('hugo-express accessToken : ', accessToken)
console.log('hugo-express refreshToken : ', refreshToken)
console.log('hugo-express profile : ', profile)
return done(null, profile.id)
const verify = (
accessToken: string,
refreshToken: string,
profile: passport_github2.Profile, // type was Profile, but well, I don't have a Profile interface or class
done: OAuth2Strategy.VerifyCallback
): void => {
console.log('hugo-express accessToken : ', accessToken)
console.log('hugo-express refreshToken : ', refreshToken)
console.log('hugo-express profile : ', profile)
// return done(null, profile.id)
return done(null, profile)