1Password/op-js

Issue with Session Token

niraj8 opened this issue · 0 comments

Your environment

op-js version: 0.1.5

CLI version: 2.7.1

OS: macos

What happened?

op allows fetching a session token, with op signin --raw, while passing this token to op-js, it fails with the following error

[ERROR] 2022/09/21 16:59:54 unknown flag: --session-token

The flag to be used for passing the session token is --session

What did you expect to happen?

The request to be correctly authenticated with the passed in session token

Steps to reproduce

import { user } from "@1password/op-js";
user.list({sessionToken: <token>})

Notes & Logs

[ERROR] 2022/09/21 16:59:54 unknown flag: --session-token