tiki-deprecated / app-shopify-extensions

Integrate mytiki.com with your Shopify Store
https://mytiki.com
GNU Affero General Public License v3.0
2 stars 0 forks source link

Error when submitting data to tiki ingest #122

Closed MiroBenicio closed 10 months ago

MiroBenicio commented 1 year ago

Reason

The Tiki Ingest is returning a JWT error

Description

When submitting the order data to tiki ingest, the endpoint is returning an error with the JWT token authentication

The query used to generate the acess token: grant_type=client_credentials&client_id=<publisher_id>&client_secret=&scope=storage

The token is generated successful, but the Tiki endpoint returns the error:

 {
  "message": "Invalid JWT",
  "detail": "cannot deserialize claims: invalid type: string \"storage.l0.mytiki.com\", expected a sequence at line 1 column 137"
} 

Success Criteria

Additional Information

No response

MiroBenicio commented 1 year ago

@mike-audi

timoguin commented 1 year ago

Pasting what @mike-audi shared in Discord:

got it. i know what the issue is (it's in the rust jwt stuff). it's expecting the audience to be a list not a string.

it's hacky, but a workaround for now is to just request multiple scopes.

request the index scope in addition to the storage scope and it should work

This is a bug in the Rust JWT code that should be fixed.

ricardobrg commented 10 months ago

solved