storage-go
storage-go copied to clipboard
Add SetAuthToken to Client
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
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.