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

New auth #48

Merged
merged 28 commits into from
Apr 16, 2024
Merged

New auth #48

merged 28 commits into from
Apr 16, 2024

Conversation

SanterreJo
Copy link
Owner

@SanterreJo SanterreJo commented Mar 1, 2024

Closes #50

📦 Published PR as canary version: 2.0.0--canary.48.5ac9481.0

✨ Test out this PR locally via:

npm install homebridge-hilo@2.0.0--canary.48.5ac9481.0
# or 
yarn add homebridge-hilo@2.0.0--canary.48.5ac9481.0

@SanterreJo SanterreJo added minor Increment the minor version when merged release Create a release when this pr is merged labels Mar 1, 2024
@tomlaf
Copy link

tomlaf commented Apr 11, 2024

Good day,

I have appelid the canary release (as the user password does not work anymore), but I'm not able to setup.
When I click on 'Login with hilo' nothing happend and this is the console error:
Uncaught (in promise) TypeError: OAuth2Client is not a constructor
at initiateAuth (index.html?origin=http%3A%2F%2F----SERVEUR URL----%3A8581&v=1.10.0--canary.48.069a029.0:30:18)
at HTMLButtonElement.onclick (index.html?origin=http%3A%2F%2F----SERVEUR URL----%3A8581&v=1.10.0--canary.48.069a029.0:23:73)
initiateAuth @ index.html?origin=http%3A%2F%2F----SERVEUR URL----%3A8581&v=1.10.0--canary.48.069a029.0:30
onclick @ index.html?origin=http%3A%2F%2F----SERVEUR URL----%3A8581&v=1.10.0--canary.48.069a029.0:23

Any idea ?

@tomlaf
Copy link

tomlaf commented Apr 11, 2024

New error, if you are tracking ;-)

Uncaught (in promise) TypeError: r(...).createHash is not a function
at o (authorization-code.ts:225:29)
at t.OAuth2AuthorizationCodeClient.getAuthorizeUri (authorization-code.ts:94:29)
at initiateAuth (index.html?origin=ht….48.eb14910.0:40:54)

@SanterreJo
Copy link
Owner Author

@tomlaf This a very rough draft of a new implementation for the new authentication flow.

This is still a Work In Progress and will not be ready for a release for at least a few days/weeks.

The latest version "works" but the flow isn't documented. So you may try it on your own. I will not try to document or support this flow for now.

@SanterreJo SanterreJo added major Increment the major version when merged and removed minor Increment the minor version when merged labels Apr 12, 2024
@SanterreJo SanterreJo mentioned this pull request Apr 12, 2024
@SanterreJo SanterreJo removed the release Create a release when this pr is merged label Apr 12, 2024
@tomlaf
Copy link

tomlaf commented Apr 12, 2024

Good day,

I suspect I'm still missing something as I get this error, when I click on "Login wiht HELO" :

index.html?origin=ht…ary.48.437a1ff.0:75
Uncaught (in promise) TypeError: r(...).createHash is not a function
at o (authorization-code.ts:225:29)
at t.OAuth2AuthorizationCodeClient.getAuthorizeUri (authorization-code.ts:94:29)
at initiateAuth (index.html?origin=ht….48.437a1ff.0:52:41)

@SanterreJo SanterreJo added the release Create a release when this pr is merged label Apr 12, 2024
@flovilmart
Copy link

Thanks for this! Gave it a spin:

Running inside my syno DSM as a docker container is a pain to get port forwarding right etc… I ended up gathering the refresh token from a node REPL and it just worked.
Perhaps we can also consider simply pasting the redirect URL that contains the « code » param inside the config, and to the code <-> refresh token exchange as such?

@SanterreJo
Copy link
Owner Author

@tomlaf can you confirm that the latest build works for you?

@tomlaf
Copy link

tomlaf commented Apr 16, 2024

Good night.

Confirm all is good to go.

@SanterreJo SanterreJo merged commit 616ac78 into main Apr 16, 2024
1 check passed
@SanterreJo SanterreJo deleted the new-auth branch April 16, 2024 12:46
Copy link

🚀 PR was released in v2.0.0 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major Increment the major version when merged release Create a release when this pr is merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nouvelle authentification Hilo
3 participants