-
Notifications
You must be signed in to change notification settings - Fork 18
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
Allow for user to define the secret key over an environment variable. #82
base: main
Are you sure you want to change the base?
Conversation
Used my Silberengel account, that is allowed to write to all four relays. This works with nostr.land and returns:
wss://mleku.realy.lol returns: wss://nostr.wine returns: wss://gitcitadel.nostr1.com returns: |
Did some debugging and shared my notes here: When the library sends a AUTH message to the relay, a dummy secret key is used. See https://github.com/nostrver-se/nostr-php/blob/main/src/Request/Request.php#L169 On
where Compared to other relays, the FYI @Mazin |
@SilberWitch See sirn-se/websocket-php#100 with a proposed change of fixing the connection to |
Painful, how you're having to patch all of these faulty AUTH implementations from your library. |
Nostrability could fix this with @alltheseas ;) |
sirn-se/websocket-php#100 (comment) merged so with a next release of this package the connection will work with |
|
||
// pull environment variable containing key that is allowed to AUTH to this relay | ||
// uses the same env name as NAK | ||
$private_key = getenv('NOSTR_SECRET_KEY'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this env variable is not set, I would suggest to fallback to a generated private key (or use a harcoded one like 11111111
)
@@ -5,6 +5,7 @@ | |||
composer.lock | |||
test*.php | |||
vendor/ | |||
/.vscode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can be removed
Need to be able to change the key to something I can auth with. Uses the same env variable technique as NAK does.