This method should only be used to migrate old credentials to the auth module. In case you don't wan't to log all users out, but have access and refresh tokens stored somewhere else, you can use this method. Please be aware there is no server checks here, we trust the input and store the credentials in the secure storage.

@tidal-music/common!TidalError - if the auth module has not been initialized

@tidal-music/common!IllegalArgumentError - if the scopes have changed, the clientUniqueKey is not the same or the accessToken is invalid

  • Parameters

    • args: { accessToken: Credentials; refreshToken?: string }
      • accessToken: Credentials

        the access token to set

      • OptionalrefreshToken?: string

        the refresh token to set

    Returns Promise<void>