privicy / onepassword-web-client

Library to access 1password web vaults.
7 stars 6 forks source link

Client version has been deprecated #7

Closed greenkiwi closed 3 years ago

greenkiwi commented 3 years ago

We have been using this module for a while. Today we started to get this error whenever we tried to login.

Error: Device couldn't be registered.

We confirmed that our key + username + password all work when signing in via a web browser to 1Password.

Do you know if anything has changed?

It would appear that the endpoint that the client library is using for login is now deprecated.

Request:
  endpoint: v2/auth/turo-prod-op-service@turo.com/A3/HRQNKK/d702e31a83e222e67dfaa1759a

        const endpoint = `v2/auth/${email}/${key.format}/${key.id}/${this.device.uuid}`;
        const response = (await this.requestService.request(endpoint, "GET"));

Response:
{
  "reason": "deprecated"
}
greenkiwi commented 3 years ago

@stevenroussey-privicy This should be fixed with #8

greenkiwi commented 3 years ago

@stevenroussey-privicy Would it make sense to have an argument passed in that would override this value? That would make it updateable without needing a new build?

stevenroussey-privicy commented 3 years ago

That would work too, but often the code needs to change as well. I'm back, so should be more up to date in the future.