-
Notifications
You must be signed in to change notification settings - Fork 32
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
OAuth error when connecting to Alby Account #1042
Comments
It doesn't work in v1.12.0 either. |
thanks for debugging this. |
That's right. I have tried this with Alby's default callback endpoint and also with the Hub's own callback. The result was the same in both cases - it appears that the oauth exchange method cannot generate the token because the POST method body is wrong. I can successfully generate a token if I construct my own API request: I've checked the oauth2 module that Alby is using as well as its source and it looks like the same parameters are being added too. But I have no idea what payload is being sent by the module. |
I have managed to get a hold of the request that the OAuth2 library is making to Alby by injecting some HTTP logging into the codebase. Here's the branch for reference if you want to run it yourself.
It looks like the Client authentication seems to work whether the client ID and secret are in the Authorization header or in the form body though. Let me see if I can make a fix for this. edit: it looks like there's other errors in the
It's calling an internal method of api.getalby.com if I'm understanding correctly? |
Hi @ZenulAbidin , there are some internal API endpoints used by Alby Hub that are only available to certain OAuth Clients maintained by Alby. It looks like you are using an OAuth client you created yourself, is this correct? Is there a reason why you do not use the default OAuth client? do you plan to host many Alby Hub nodes on your own infrastructure? |
Actually, I am using the oauth client that's built into Hub as well as Alby's server. Both without environment variables and with ABLY_OAUTH_CLIENT_ID and secret set from https://getalby.com/developer.
It's a bit strange because I can't consistently reproduce this issue. Basically, I am trying to get people to set up Lightning nodes with software such as Alby Hub so that's why I wanted to try running it myself first. So these errors have me confused, to be honest.
Perhaps I should check if this resolves itself after I wipe the current installation and re-install Server. Without using git or the source tree, just binaries.
…On Friday, January 31st, 2025 at 12:39 PM, Roland ***@***.***> wrote:
Hi ***@***.***(https://github.com/ZenulAbidin) , there are some internal API endpoints used by Alby Hub that are only available to certain OAuth Clients maintained by Alby. It looks like you are using an OAuth client you created yourself, is this correct?
Is there a reason why you do not use the default OAuth client? do you plan to host many Alby Hub nodes on your own infrastructure?
—
Reply to this email directly, [view it on GitHub](#1042 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AKE46J2FBK4642PQS5OQAIT2NNVJPAVCNFSM6AAAAABWCMA62OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRXGE4DSNRUGI).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@ZenulAbidin so even when you do not set the ALBY_OAUTH_CLIENT_ID and ALBY_OAUTH_CLIENT_SECRET, you still get intermittent issues? Unfortunately Alby Hub will not work properly with custom-created OAuth clients from the https://getalby.com/developer page. The only OAuth client that will work is the default one (which does a redirect to getalby.com and the user must copy the code and paste it in the hub to login) |
Yes, that's right. But only on Server for some reason. Desktop works properly and is what I'm using in lieu of the server.
The part about the oauth credentials from the developer page not working is good to know, thanks.
I still haven't re-installed Alby Hub Server yet. So once I do that I will take note of the log output.
…On Saturday, February 1st, 2025 at 5:04 AM, Roland ***@***.***> wrote:
***@***.***(https://github.com/ZenulAbidin) so even when you do not set the ALBY_OAUTH_CLIENT_ID and ALBY_OAUTH_CLIENT_SECRET, you still get intermittent issues?
Unfortunately Alby Hub will not work properly with custom-created OAuth clients from the https://getalby.com/developer page. The only OAuth client that will work is the default one (which does a redirect to getalby.com and the user must copy the code and paste it in the hub to login)
—
Reply to this email directly, [view it on GitHub](#1042 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AKE46JYN2XCYDTTHARY2A7T2NRIV3AVCNFSM6AAAAABWCMA62OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRYG43TMOBXHA).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Problem
After running Alby Hub, integration with Alby Account is broken because after pasting the Authorization code, this status 500 error appears in the logs:
The error message on the screen:
This prevents the Hub from connecting to Alby Account.
The problem occurs with both the docker containers and the one-click install script.
EDIT: In the callback URL endpoint there seems to be having some problem running the
albyHttpSvc.albyOAuthSvc.CallbackHandler
method that causes the above error:hub/http/alby_http_service.go
Lines 100 to 109 in d64233f
Software Information
AlbyHub v1.13.0
System Information
copied and pasted from neofetch
OS: Debian GNU/Linux 12 (bookworm) x86_64
Host: KVM/QEMU (Standard PC (i440FX + PIIX, 1996) pc-i440fx-8.1)
Kernel: 6.1.0-25-amd64
Uptime: 125 days, 3 hours, 6 mins
Packages: 470 (dpkg)
Shell: bash 5.2.15
Resolution: 1280x800
CPU: QEMU Virtual version 2.5+ (2) @ 3.499GHz
GPU: 00:02.0 Vendor 1234 Device 1111
Memory: 1313MiB / 15957MiB
The text was updated successfully, but these errors were encountered: