storage-go icon indicating copy to clipboard operation
storage-go copied to clipboard

Add SetAuthToken to Client

Open namzug16 opened this issue 9 months ago • 1 comments

What kind of change does this PR introduce?

The PR resolves (#29)[https://github.com/supabase-community/storage-go/issues/29]

What is the current behavior?

Auth token can only be set from the Client creation method

What is the new behavior?

Now it is possible to set the auth token whenever needed

Additional context

namzug16 avatar Apr 25 '24 16:04 namzug16

Thank @namzug16 for your contribute, it's similar our purpose in next version v0.8.0. We will make it similar with storage-js, it won't pass key like a parameter, we will pass it in a map like this:

const storageClient = new StorageClient(STORAGE_URL, {
  apikey: SERVICE_KEY,
  Authorization: `Bearer ${SERVICE_KEY}`,
})

It will be more flexible for developers to use.

tranhoangvuit avatar May 07 '24 16:05 tranhoangvuit