Closed Jean-Baptiste-Lasselle closed 3 years ago
Hi
You're right.
Add Profile
interface.
import { Strategy, Profile } from 'passport-github2'
The second argument of the done
is object.
const verify = (
accessToken: string,
refreshToken: string,
profile: Profile,
done: OAuth2Strategy.VerifyCallback
): void => {
console.log('accessToken', accessToken)
console.log('refreshToken', refreshToken)
console.log('profile', profile)
return done(null, { id: profile.id, key1: profile.displayName, key2: profile.profileUrl })
}
Thanks
Hi, I wanted to thank you :
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 :