1Password / onepassword-sdk-js

The official JavaScript SDK for 1Password
https://developer.1password.com/docs/sdks/
MIT License
41 stars 2 forks source link

hi, I tried to call the createClient function in nodejs but then got an error. #89

Open AlexShui opened 1 week ago

AlexShui commented 1 week ago

Scenario & Reproduction Steps

I just get the service key and then tried in my nodejs code. but I can createClient. I used the right key but still got error. the error said authentication error: http error: error issuing the request with reqwest: bad data provided to builder

Actual Behavior

image

image

Expected Behavior

No response

SDK version

"@1password/sdk": "^0.1.1",

Additional information

No response

AndyTitu commented 5 days ago

@AlexShui what nodeJS version are you using? We're supporting v18 and above.

AndyTitu commented 5 days ago

@AlexShui could you decode you service account token using echo <your token> | base64 --decode and let us know how your signInAdress looks like? That URL is not sensitive, although it may be personal, so you can omit your exact domain name if you want, as we're mostly interested in the overall format of that url. But we think the issue might have something to do with a particularity of your signin address.

hculea commented 5 days ago

@AlexShui to apply what Andi recommended, make sure to strip the ops_ prefix from your token.