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

Unable to Implement Alby Wallet Login #14

Open
ChanoSan opened this issue Nov 12, 2023 · 6 comments
Open

Unable to Implement Alby Wallet Login #14

ChanoSan opened this issue Nov 12, 2023 · 6 comments

Comments

@ChanoSan
Copy link

Plugin Version: 5.2.4
PeerTube Version: 5.2.1
Server is running Ubuntu 20.04.6 LTS (focal)

In plugin settings, I've enabled "Enable logging in with alby wallet". All other API settings etc are correctly input. Lightning donation buttons appear as expected on enabled videos, and in all response the plugin seems to work.

However, clicking the Login button only shows the standard login fields, with no option to login with an Alby wallet.

I did notice that the test instance (https://freediverse.com/) shows the URL "https://freediverse.com/plugins/lightning/5.2.3/auth/getalby" , while my own instance button shows "https://peertube.anon-kenkai.com/login" (the standard end point for the login dialogue).

It's probably worth noting, I had standard accounts enabled for some time before I installed the plugin. I'm not sure it handles both standard logins and Alby wallet logins. The impression I got from Freediverse is that Alby login is the only method, and no standard login is possible.

Does this mean that Alby login is only possible if all other forms of login do not exist? Is it possible for conventional login and Alby wallet login to coexist on a server?

@dhk2
Copy link
Owner

dhk2 commented Nov 12, 2023

Both logon methods can definitely coexist, they are on my https://p2ptube.us test instance.
When I try to authorize my getalby account in v4v settings it's erroring out and indicating an issue client/key for getalby.
I'll check that code for what might be causing it.

Did you follow the steps in https://github.com/dhk2/peertube-plugin-lightning/wiki/How-to-enable-Alby-Wallet-integration-for-PeerTube-users to get the client id/key? what did you put in for the callback url?

@ChanoSan
Copy link
Author

The callback URL should be "https://peertube.anon-kenkai.com/plugins/lightning/router/callback"
AFAIK the Client ID/Key are correctly entered, but I'll re-check

The entirety of the OAuth URL is as follows:
https://getalby.com/oauth?client_id=LaARONZIEG&response_type=code&redirect_uri=https://peertube.anon-kenkai.com/plugins/lightning/router/callback&scope=balance:read

I'm wondering if the scope/permissions need to be modified?

@ChanoSan
Copy link
Author

As a followup, attempting to visit https://peertube.anon-kenkai.com/plugins/lightning/5.2.4/auth/getalby results in the following error:

{"type":"about:blank","title":"Not Found","detail":"No external auths were found for this plugin","status":404,"error":"No external auths were found for this plugin"}

@dhk2
Copy link
Owner

dhk2 commented Nov 12, 2023

It's not setting up the external logon, probably for the same reason authorizing is failing. According to the console error it's throwing there is no client key set. The console messages beforehand also clearly show the client key is set. it's a conundrum and I have been unable to duplicate it. I'm going to add some more diagnostic output to the console errors and push a new version out to NPM to see if that can help narrow down what's failing.

@ChanoSan
Copy link
Author

I get the impression the new version might have fixed things, actually. I just updated to 5.2.5, and the Alby Authentication login button now exists, and seems to work. V2V wallet authorization in the user settings panel also functions as expected.

I've yet to actually have Zaps tested, but I think we might be okay now.

@dhk2
Copy link
Owner

dhk2 commented Nov 13, 2023

Yep, I was able to authenticate with Alby and send zaps on https://peertube.anon-kenkai.com/w/kpQcLbbmsGqEPKFXs9Lqkq with webln and integrated wallet, so federated boosting is working.

There was some wonkiness on the authorization after creating the account and I had to de-authorize/authorize to get it working properly, so I'll take a look at that next.

Thanks for the beta testing help.

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

No branches or pull requests

2 participants