mirror of
https://github.com/fiatjaf/nak.git
synced 2025-09-01 06:20:46 -04:00
update go-nostr keyer interface and make req --auth work again.
This commit is contained in:
6
req.go
6
req.go
@@ -76,7 +76,7 @@ example:
|
||||
relayUrls,
|
||||
c.Bool("force-pre-auth"),
|
||||
nostr.WithAuthHandler(
|
||||
func(authEvent *nostr.Event) error {
|
||||
func(ctx context.Context, authEvent nostr.RelayEvent) error {
|
||||
if !c.Bool("auth") && !c.Bool("force-pre-auth") {
|
||||
return fmt.Errorf("auth not authorized")
|
||||
}
|
||||
@@ -85,10 +85,10 @@ example:
|
||||
return err
|
||||
}
|
||||
|
||||
pk := kr.GetPublicKey(ctx)
|
||||
pk, _ := kr.GetPublicKey(ctx)
|
||||
log("performing auth as %s... ", pk)
|
||||
|
||||
return kr.SignEvent(ctx, authEvent)
|
||||
return kr.SignEvent(ctx, authEvent.Event)
|
||||
},
|
||||
),
|
||||
)
|
||||
|
Reference in New Issue
Block a user