Skip to content

Commit

Permalink
fix login token URL
Browse files Browse the repository at this point in the history
  • Loading branch information
dhax committed Sep 19, 2024
1 parent 35ae0f3 commit 8c140ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions auth/pwdless/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package pwdless
import (
"fmt"
"net/http"
"path"
"net/url"
"strings"
"time"

Expand Down Expand Up @@ -123,12 +123,13 @@ func (rs *Resource) login(w http.ResponseWriter, r *http.Request) {
}

lt := rs.LoginAuth.CreateToken(acc.ID)
tokenURL, _ := url.JoinPath(rs.LoginAuth.loginURL, lt.Token)

go func() {
content := email.ContentLoginToken{
Email: acc.Email,
Name: acc.Name,
URL: path.Join(rs.LoginAuth.loginURL, lt.Token),
URL: tokenURL,
Token: lt.Token,
Expiry: lt.Expiry,
}
Expand Down

0 comments on commit 8c140ba

Please sign in to comment.