Compare commits
6 Commits
0.24.0-bet
...
0.25.0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
360dd3c3bd | ||
![]() |
c6add0cca6 | ||
![]() |
7ac6252aac | ||
![]() |
5d2d1c342b | ||
![]() |
6da0a85936 | ||
![]() |
116972d725 |
@@ -72,11 +72,13 @@ export default function Login({ urlProps }: { urlProps: Record<string, any> }) {
|
||||
</Footer>
|
||||
</Fragment>
|
||||
)}
|
||||
{config.is_sign_up_enabled && (
|
||||
<FooterContent>
|
||||
Don't have an account? <Link to="/app/signup"> Sign Up</Link>
|
||||
</FooterContent>
|
||||
)}
|
||||
{config.is_basic_authentication_enabled &&
|
||||
!config.is_magic_link_login_enabled &&
|
||||
config.is_sign_up_enabled && (
|
||||
<FooterContent>
|
||||
Don't have an account? <Link to="/app/signup"> Sign Up</Link>
|
||||
</FooterContent>
|
||||
)}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
@@ -19,4 +19,6 @@ const (
|
||||
DbTypeMariaDB = "mariadb"
|
||||
// DbTypeCassandra is the cassandra database type
|
||||
DbTypeCassandraDB = "cassandradb"
|
||||
// DbTypeScyllaDB is the scylla database type
|
||||
DbTypeScyllaDB = "scylladb"
|
||||
)
|
||||
|
@@ -3,14 +3,6 @@ package constants
|
||||
var VERSION = "0.0.1"
|
||||
|
||||
const (
|
||||
// Envstore identifier
|
||||
// StringStore string store identifier
|
||||
// StringStoreIdentifier = "stringStore"
|
||||
// // BoolStore bool store identifier
|
||||
// BoolStoreIdentifier = "boolStore"
|
||||
// // SliceStore slice store identifier
|
||||
// SliceStoreIdentifier = "sliceStore"
|
||||
|
||||
// EnvKeyEnv key for env variable ENV
|
||||
EnvKeyEnv = "ENV"
|
||||
// EnvKeyEnvPath key for cli arg variable ENV_PATH
|
||||
|
@@ -20,10 +20,10 @@ func InitDB() error {
|
||||
|
||||
envs := memorystore.RequiredEnvStoreObj.GetRequiredEnv()
|
||||
|
||||
isSQL := envs.DatabaseType != constants.DbTypeArangodb && envs.DatabaseType != constants.DbTypeMongodb && envs.DatabaseType != constants.DbTypeCassandraDB
|
||||
isSQL := envs.DatabaseType != constants.DbTypeArangodb && envs.DatabaseType != constants.DbTypeMongodb && envs.DatabaseType != constants.DbTypeCassandraDB && envs.DatabaseType != constants.DbTypeScyllaDB
|
||||
isArangoDB := envs.DatabaseType == constants.DbTypeArangodb
|
||||
isMongoDB := envs.DatabaseType == constants.DbTypeMongodb
|
||||
isCassandra := envs.DatabaseType == constants.DbTypeCassandraDB
|
||||
isCassandra := envs.DatabaseType == constants.DbTypeCassandraDB || envs.DatabaseType == constants.DbTypeScyllaDB
|
||||
|
||||
if isSQL {
|
||||
log.Info("Initializing SQL Driver for: ", envs.DatabaseType)
|
||||
|
@@ -29,6 +29,8 @@ func NewProvider() (*provider, error) {
|
||||
dbPort := memorystore.RequiredEnvStoreObj.GetRequiredEnv().DatabasePort
|
||||
if dbPort != "" && dbHost != "" {
|
||||
dbURL = fmt.Sprintf("%s:%s", dbHost, dbPort)
|
||||
} else if dbHost != "" {
|
||||
dbURL = dbHost
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -214,7 +214,7 @@ func OAuthCallbackHandler() gin.HandlerFunc {
|
||||
if strings.Contains(redirectURL, "?") {
|
||||
redirectURL = redirectURL + "&" + params
|
||||
} else {
|
||||
redirectURL = redirectURL + "?" + params
|
||||
redirectURL = redirectURL + "?" + strings.TrimPrefix(params, "&")
|
||||
}
|
||||
|
||||
c.Redirect(http.StatusTemporaryRedirect, redirectURL)
|
||||
|
@@ -115,7 +115,7 @@ func VerifyEmailHandler() gin.HandlerFunc {
|
||||
if strings.Contains(redirectURL, "?") {
|
||||
redirectURL = redirectURL + "&" + params
|
||||
} else {
|
||||
redirectURL = redirectURL + "?" + params
|
||||
redirectURL = redirectURL + "?" + strings.TrimPrefix(params, "&")
|
||||
}
|
||||
|
||||
go db.Provider.AddSession(models.Session{
|
||||
|
@@ -4,9 +4,10 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/authorizerdev/authorizer/server/constants"
|
||||
"github.com/authorizerdev/authorizer/server/memorystore"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// GetHost returns hostname from request context
|
||||
@@ -14,15 +15,15 @@ import (
|
||||
// if EnvKeyAuthorizerURL is set it is given second highest priority.
|
||||
// if above 2 are not set the requesting host name is used
|
||||
func GetHost(c *gin.Context) string {
|
||||
authorizerURL := c.Request.Header.Get("X-Authorizer-URL")
|
||||
authorizerURL, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyAuthorizerURL)
|
||||
if err != nil {
|
||||
authorizerURL = ""
|
||||
}
|
||||
if authorizerURL != "" {
|
||||
return authorizerURL
|
||||
}
|
||||
|
||||
authorizerURL, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyAuthorizerURL)
|
||||
if err == nil {
|
||||
authorizerURL = ""
|
||||
}
|
||||
authorizerURL = c.Request.Header.Get("X-Authorizer-URL")
|
||||
if authorizerURL != "" {
|
||||
return authorizerURL
|
||||
}
|
||||
|
@@ -197,7 +197,7 @@ func MagicLinkLoginResolver(ctx context.Context, params model.MagicLinkLoginInpu
|
||||
if strings.Contains(redirectURL, "?") {
|
||||
redirectURL = redirectURL + "&" + redirectURLParams
|
||||
} else {
|
||||
redirectURL = redirectURL + "?" + redirectURLParams
|
||||
redirectURL = redirectURL + "?" + strings.TrimPrefix(redirectURLParams, "&")
|
||||
}
|
||||
|
||||
verificationType := constants.VerificationTypeMagicLinkLogin
|
||||
|
@@ -3,10 +3,11 @@ package token
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/golang-jwt/jwt"
|
||||
|
||||
"github.com/authorizerdev/authorizer/server/constants"
|
||||
"github.com/authorizerdev/authorizer/server/crypto"
|
||||
"github.com/authorizerdev/authorizer/server/memorystore"
|
||||
"github.com/golang-jwt/jwt"
|
||||
)
|
||||
|
||||
// SignJWTToken common util to sing jwt token
|
||||
|
Reference in New Issue
Block a user