diff --git a/README.md b/README.md index 35afd747..4b15441b 100644 --- a/README.md +++ b/README.md @@ -67,17 +67,17 @@ The default option is that the NWC app creates a secret and the user uses the no ##### Query parameter options -- `c`: the name of the client app +- `name`: the name of the client app Example: -`/apps/new?c=myapp` +`/apps/new?name=myapp` #### Client created secret If the client creates the secret the client only needs to share the public key of that secret for authorization. The user authorized that pubkey and no sensitivate data needs to be shared. ##### Query parameter options for /new -- `c`: the name of the client app +- `name`: the name of the client app - `pubkey`: the public key of the client's secret for the user to authorize - `return_to`: (optional) if a `return_to` URL is provided the user will be redirected to that URL after authorization. The `lud16`, `relay` and `pubkey` query parameters will be added to the URL. - `expires_at` (optional) connection cannot be used after this date. Unix timestamp in seconds. @@ -87,7 +87,7 @@ If the client creates the secret the client only needs to share the public key o Example: -`/apps/new?c=myapp&pubkey=47c5a21...&return_to=https://example.com` +`/apps/new?name=myapp&pubkey=47c5a21...&return_to=https://example.com` #### Web-flow: client created secret Web clients can open a new prompt popup to load the authorization page. diff --git a/echo_handlers.go b/echo_handlers.go index e6563f8e..9458df70 100644 --- a/echo_handlers.go +++ b/echo_handlers.go @@ -240,7 +240,11 @@ func getEndOfBudgetString(endOfBudget time.Time) (result string) { } func (svc *Service) AppsNewHandler(c echo.Context) error { - appName := c.QueryParam("c") // c - for client + appName := c.QueryParam("name") + if (appName == "") { + // c - for client (deprecated) + appName = c.QueryParam("c") + } pubkey := c.QueryParam("pubkey") returnTo := c.QueryParam("return_to") maxAmount := c.QueryParam("max_amount") diff --git a/views/apps/new.html b/views/apps/new.html index 6063b8d9..a522fc90 100644 --- a/views/apps/new.html +++ b/views/apps/new.html @@ -101,7 +101,7 @@

{{else}} -

Connection expiry time

+

Connection expiry time

{{ .ExpiresAtFormatted }}

{{end}} diff --git a/views/layout.html b/views/layout.html index 77214b81..5f1ede58 100644 --- a/views/layout.html +++ b/views/layout.html @@ -12,7 +12,7 @@
-