How to use the InternalOAuthError function from passport-oauth2

Find comprehensive JavaScript passport-oauth2.InternalOAuthError code examples handpicked from public code repositorys.

20
21
22
23
24
25
26
27
28
29
userProfile (accessToken, done) {
  this._oauth2.get(this._userProfileURL, accessToken, function (err, body, res) {
    let json

    if (err) {
      return done(new InternalOAuthError('Failed to fetch user profile', err))
    }

    try {
      json = JSON.parse(body)
fork icon0
star icon3
watch icon1

+ 29 other calls in file