Return 501 Not Implemented for nostr auth
This commit is contained in:
parent
26485a2307
commit
3957d4d774
|
@ -20,6 +20,10 @@ func HandleAuth(sc context.Context, action string) echo.HandlerFunc {
|
|||
return LnAuth(sc, c, action)
|
||||
}
|
||||
|
||||
if c.Param("method") == "nostr" {
|
||||
return NostrAuth(sc, c, action)
|
||||
}
|
||||
|
||||
// on session guard redirects to /login,
|
||||
// we need to make sure that HTMX selects and targets correct element
|
||||
c.Response().Header().Add("HX-Retarget", "#content")
|
||||
|
@ -153,6 +157,10 @@ func HandleLnAuthCallback(sc context.Context) echo.HandlerFunc {
|
|||
}
|
||||
}
|
||||
|
||||
func NostrAuth(sc context.Context, c echo.Context, action string) error {
|
||||
return echo.NewHTTPError(http.StatusNotImplemented, nil)
|
||||
}
|
||||
|
||||
func HandleSessionCheck(sc context.Context) echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
var (
|
||||
|
|
|
@ -34,7 +34,10 @@ templ Auth(action string) {
|
|||
</svg>
|
||||
{ action } with lightning
|
||||
</button>
|
||||
<button class="flex signup nostr my-3 items-center">
|
||||
<button
|
||||
class="flex signup nostr my-3 items-center"
|
||||
hx-get={ string(templ.SafeURL(fmt.Sprintf("/%s/nostr", action))) }
|
||||
>
|
||||
<svg
|
||||
class="me-1"
|
||||
width="16"
|
||||
|
|
Loading…
Reference in New Issue