fix: app login page signup url
add debug logs
This commit is contained in:
parent
5d2d1c342b
commit
7ac6252aac
|
@ -72,11 +72,13 @@ export default function Login({ urlProps }: { urlProps: Record<string, any> }) {
|
||||||
</Footer>
|
</Footer>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
{config.is_sign_up_enabled && (
|
{config.is_basic_authentication_enabled &&
|
||||||
<FooterContent>
|
!config.is_magic_link_login_enabled &&
|
||||||
Don't have an account? <Link to="/app/signup"> Sign Up</Link>
|
config.is_sign_up_enabled && (
|
||||||
</FooterContent>
|
<FooterContent>
|
||||||
)}
|
Don't have an account? <Link to="/app/signup"> Sign Up</Link>
|
||||||
|
</FooterContent>
|
||||||
|
)}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ func VerifyEmailHandler() gin.HandlerFunc {
|
||||||
|
|
||||||
// verify if token exists in db
|
// verify if token exists in db
|
||||||
hostname := parsers.GetHost(c)
|
hostname := parsers.GetHost(c)
|
||||||
|
log.Debug("hostname used for jwt verification: ", hostname)
|
||||||
claim, err := token.ParseJWTToken(tokenInQuery, hostname, verificationRequest.Nonce, verificationRequest.Email)
|
claim, err := token.ParseJWTToken(tokenInQuery, hostname, verificationRequest.Nonce, verificationRequest.Email)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Debug("Error parsing token: ", err)
|
log.Debug("Error parsing token: ", err)
|
||||||
|
|
|
@ -3,10 +3,12 @@ package token
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
|
"github.com/golang-jwt/jwt"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/authorizerdev/authorizer/server/constants"
|
"github.com/authorizerdev/authorizer/server/constants"
|
||||||
"github.com/authorizerdev/authorizer/server/crypto"
|
"github.com/authorizerdev/authorizer/server/crypto"
|
||||||
"github.com/authorizerdev/authorizer/server/memorystore"
|
"github.com/authorizerdev/authorizer/server/memorystore"
|
||||||
"github.com/golang-jwt/jwt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// SignJWTToken common util to sing jwt token
|
// SignJWTToken common util to sing jwt token
|
||||||
|
@ -115,6 +117,7 @@ func ParseJWTToken(token, hostname, nonce, subject string) (jwt.MapClaims, error
|
||||||
intIat := int64(claims["iat"].(float64))
|
intIat := int64(claims["iat"].(float64))
|
||||||
claims["exp"] = intExp
|
claims["exp"] = intExp
|
||||||
claims["iat"] = intIat
|
claims["iat"] = intIat
|
||||||
|
log.Debug("claims: ", claims)
|
||||||
clientID, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyClientID)
|
clientID, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyClientID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return claims, err
|
return claims, err
|
||||||
|
@ -196,6 +199,7 @@ func ParseJWTTokenWithoutNonce(token, hostname string) (jwt.MapClaims, error) {
|
||||||
intIat := int64(claims["iat"].(float64))
|
intIat := int64(claims["iat"].(float64))
|
||||||
claims["exp"] = intExp
|
claims["exp"] = intExp
|
||||||
claims["iat"] = intIat
|
claims["iat"] = intIat
|
||||||
|
log.Debug("claims: ", claims)
|
||||||
clientID, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyClientID)
|
clientID, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyClientID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return claims, err
|
return claims, err
|
||||||
|
|
Loading…
Reference in New Issue
Block a user