Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SetAuthToken to Client #30

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

namzug16
Copy link

What kind of change does this PR introduce?

The PR resolves (#29)[https://github.com//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

@tranhoangvuit
Copy link
Contributor

tranhoangvuit commented May 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants