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 issues obtaining the JWT #14

Merged
merged 1 commit into from
Jul 17, 2024
Merged

Conversation

rixth
Copy link
Contributor

@rixth rixth commented Jul 10, 2024

Couple things have broken/changed on SC's end.

  • LoginComplete now 500s on a null being sent as the ReturnUrl. Send a valid value.
  • LoginComplete now returns a 302 on success. Cookies are only returned by aiohttp for the last request that was followed, so we need to disable following redirects.

I confirmed that error handling for invalid username/password still works as expected.

Resolves Southern-Company-HA/southern-company-hacs#80

cc @Lash-L @dcsim0n

@Lash-L
Copy link
Collaborator

Lash-L commented Jul 10, 2024

Thanks @rixth I'll try this out sometime tomorrow!

@Lash-L
Copy link
Collaborator

Lash-L commented Jul 11, 2024

From a quick test - it seems to run, thanks!

Can you change all of the instances of 200 in the tests to 302? Otherwise it wont output a release

@dcsim0n
Copy link

dcsim0n commented Jul 15, 2024

@rixth, let me know if you can't get around to finishing the PR, I can try and jump in.

Couple things have broken/changed:

* `LoginComplete` now 500s on a `null` being sent as the `ReturnUrl`. Send a valid value.
* `LoginComplete` now returns a 302 on success. Cookies are only returned by `aiohttp` for the last request that was followed, so we need to disable following redirects.

I confirmed that error handling for invalid username/password still works as expected.

Resolves Southern-Company-HA/southern-company-hacs#80
@rixth
Copy link
Contributor Author

rixth commented Jul 17, 2024

@Lash-L good to go!

@Lash-L Lash-L merged commit 086c270 into Southern-Company-HA:main Jul 17, 2024
12 checks passed
@Lash-L
Copy link
Collaborator

Lash-L commented Jul 17, 2024

Thank you @rixth

@Lash-L
Copy link
Collaborator

Lash-L commented Jul 23, 2024

@rixth If you have time, please investigate it still not working properly on the hacs integration. I have not done much with it, but I did bump the version and do some other 'chores' on the repo

@Lash-L
Copy link
Collaborator

Lash-L commented Jul 26, 2024

Please ignore - I should have it fixed in the latest update

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.

Home Assistant 2024.6.3 issued started : Failed updating jwt token
3 participants