textileio / js-textile

Textile's JavaScript Libs. Home of ThreadDB, Buckets, and more. Available on npm as `@textile/hub`.
https://textileio.github.io/js-textile/docs
MIT License
85 stars 19 forks source link

Use context.toMetadata to trigger token refresh #1227

Closed carsonfarmer closed 2 years ago

carsonfarmer commented 2 years ago

Signed-off-by: Carson Farmer carson.farmer@gmail.com

Description

Use context.toMetadata in all grpc-connection based unary RPC calls, rather than toJSON, which doesn't do an automatic token refresh even when it is provided.

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

I will add a test.

Checklist:

This PR template comes from https://github.com/embeddedartistry/templates