Skip to content

Commit 7ac6252

Browse files
committed
fix: app login page signup url
add debug logs
1 parent 5d2d1c3 commit 7ac6252

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

app/src/pages/login.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ export default function Login({ urlProps }: { urlProps: Record<string, any> }) {
7272
</Footer>
7373
</Fragment>
7474
)}
75-
{config.is_sign_up_enabled && (
76-
<FooterContent>
77-
Don't have an account? <Link to="/app/signup"> Sign Up</Link>
78-
</FooterContent>
79-
)}
75+
{config.is_basic_authentication_enabled &&
76+
!config.is_magic_link_login_enabled &&
77+
config.is_sign_up_enabled && (
78+
<FooterContent>
79+
Don't have an account? <Link to="/app/signup"> Sign Up</Link>
80+
</FooterContent>
81+
)}
8082
</Fragment>
8183
);
8284
}

server/handlers/verify_email.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ func VerifyEmailHandler() gin.HandlerFunc {
4242

4343
// verify if token exists in db
4444
hostname := parsers.GetHost(c)
45+
log.Debug("hostname used for jwt verification: ", hostname)
4546
claim, err := token.ParseJWTToken(tokenInQuery, hostname, verificationRequest.Nonce, verificationRequest.Email)
4647
if err != nil {
4748
log.Debug("Error parsing token: ", err)

server/token/jwt.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ package token
33
import (
44
"errors"
55

6+
"github.com/golang-jwt/jwt"
7+
log "github.com/sirupsen/logrus"
8+
69
"github.com/authorizerdev/authorizer/server/constants"
710
"github.com/authorizerdev/authorizer/server/crypto"
811
"github.com/authorizerdev/authorizer/server/memorystore"
9-
"github.com/golang-jwt/jwt"
1012
)
1113

1214
// SignJWTToken common util to sing jwt token
@@ -115,6 +117,7 @@ func ParseJWTToken(token, hostname, nonce, subject string) (jwt.MapClaims, error
115117
intIat := int64(claims["iat"].(float64))
116118
claims["exp"] = intExp
117119
claims["iat"] = intIat
120+
log.Debug("claims: ", claims)
118121
clientID, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyClientID)
119122
if err != nil {
120123
return claims, err
@@ -196,6 +199,7 @@ func ParseJWTTokenWithoutNonce(token, hostname string) (jwt.MapClaims, error) {
196199
intIat := int64(claims["iat"].(float64))
197200
claims["exp"] = intExp
198201
claims["iat"] = intIat
202+
log.Debug("claims: ", claims)
199203
clientID, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyClientID)
200204
if err != nil {
201205
return claims, err

0 commit comments

Comments
 (0)