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

Fix getting client_id and auth_url for login endpoint #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AzamatKomaev
Copy link

  1. JSON schema of login endpoint was changed. Now it does not have "legacy" key. Use "wso" instead.
  2. Temporarily changed docker build settings in docker-compose.yaml for debugging application.

@AzamatKomaev
Copy link
Author

image

Copy link
Member

@evgfilim1 evgfilim1 left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request! I haven't tested it yet, and I don't know when I will, but anyway, here are some changes that will make this PR better.

Comment on lines +109 to +110
client_id = r.json()["wso"]["clientId"]
auth_url = r.json()["wso"]["loginUrl"]
Copy link
Member

Choose a reason for hiding this comment

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

Please don't decode the response twice.

Suggested change
client_id = r.json()["wso"]["clientId"]
auth_url = r.json()["wso"]["loginUrl"]
data = r.json()["wso"]
auth_url = data["loginUrl"]
client_id = data["clientId"]

Comment on lines +5 to +7
# image: ghcr.io/amodeus-app/amodeus-api
build:
context: .
Copy link
Member

Choose a reason for hiding this comment

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

Let's leave it as-is for a while. I'll return to the project some day and rewrite the docker compose file entirely, also adjusting the API itself to the changes.

Suggested change
# image: ghcr.io/amodeus-app/amodeus-api
build:
context: .
image: ghcr.io/amodeus-app/amodeus-api

@depocoder
Copy link

depocoder commented Oct 19, 2024

Thanks for the pull request! I haven't tested it yet, and I don't know when I will, but anyway, here are some changes that will make this PR better.

I have checked changes, and it's working good with these changes

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.

3 participants