Skip to content

DeprecationWarning: Using a domain property in MakeCallback is deprecated. #537

Open
@AlbertHambardzumyan

Description

@AlbertHambardzumyan

Version: v3 (3.0.1)

Calling .authenticate() which triggers (at least):

  • getAccessToken()

Let's say the above fn successfully returns the object (fields: accessToken, accessTokenExpiresAt, client, user, scope)

static async getAccessToken (accessToken) {
      const token = await OAuth2AccessTokensModel.getOauth2AccessToken(accessToken)
      if (!token) {
        throw new ResourceNotFoundError(`The token for ${accessToken} is not found.`))
      }

      const { accessTokenExpiresAt, clientId, userId, scope } = token

      return { accessToken, accessTokenExpiresAt, scope, client: { id: clientId }, user: { id: userId } }
  }

However, the token is expired and the library returns error (invalid_token) on .authenticate() call and deprecation warning.

Any thoughts on deprecation warning?
(node:22198) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions