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

Merged
merged 17 commits into from
Dec 2, 2024
Merged

Feat/authenticate request #1101

merged 17 commits into from
Dec 2, 2024

Conversation

ochhii1337
Copy link
Contributor

No description provided.

@ochhii1337 ochhii1337 requested a review from towanTG November 27, 2024 22:05
@github-actions github-actions bot added the api label Nov 27, 2024
@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

@github-actions github-actions bot added the cosmos label Dec 2, 2024
@towanTG towanTG merged commit c634681 into develop Dec 2, 2024
6 checks passed
@towanTG towanTG deleted the feat/authenticate-request branch December 2, 2024 14:54
@github-actions github-actions bot mentioned this pull request Dec 2, 2024
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 cosmos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants