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

Feat/authenticate request #1101

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Conversation

ochhii1337
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the core SwapKit core & it's components related label Nov 28, 2024
) {
const response = await RequestClient.post<QuoteResponse>(`${getBaseUrl(isDev)}/quote`, {
const url = `${getBaseUrl(isDev)}/quote`;
const hash = apiKey
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so when you have an api key you always compute the hash?
then why do we set the api key in the header?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update to exclude api key header if there is a hash

json: payload,
headers: apiKey ? { "x-api-key": apiKey } : {},
headers: {
...(apiKey && !hash ? { "x-api-key": apiKey } : {}),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will always be false 😓

if we want to offer usage of apikey only. I would use referer as flag to compute the hash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api core SwapKit core & it's components related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants