Skip to content

Commit e061015

Browse files
committed
small fix in login link
1 parent 390cd1e commit e061015

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/handlers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package api
33
import (
44
"fmt"
55
"net/http"
6+
"net/url"
67

78
"github.com/simpleauthlink/authapi/api/io"
89
"github.com/simpleauthlink/authapi/notification"
@@ -74,7 +75,7 @@ func (s *Service) requestTokenHandler(w http.ResponseWriter, r *http.Request) {
7475
AppName: app.Name,
7576
Email: req.Data.Email,
7677
Token: token.String(),
77-
Link: app.RedirectURI + token.String(),
78+
Link: app.RedirectURI + url.QueryEscape(token.String()),
7879
}
7980
loginEmail, err := login.Template.Compose(notification.NotificationParams{
8081
To: req.Data.Email,

0 commit comments

Comments
 (0)