mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-30 17:30:55 +00:00
fix: improve secret generation for apple idp (#7843)
* fix: improve secret generation for apple idp * remove accidental commit * change exp time * change exp time * change exp time * change exp time
This commit is contained in:
parent
5811a7b6a5
commit
6ab06aa249
@ -18,7 +18,6 @@ import (
|
||||
"github.com/zitadel/zitadel/internal/command"
|
||||
"github.com/zitadel/zitadel/internal/config/hook"
|
||||
"github.com/zitadel/zitadel/internal/config/systemdefaults"
|
||||
"github.com/zitadel/zitadel/internal/crypto"
|
||||
"github.com/zitadel/zitadel/internal/database"
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
"github.com/zitadel/zitadel/internal/id"
|
||||
@ -70,7 +69,6 @@ func MustNewConfig(v *viper.Viper) *Config {
|
||||
hook.EnumHookFunc(authz.MemberTypeString),
|
||||
actions.HTTPConfigDecodeHook,
|
||||
hooks.MapTypeStringDecode[string, *authz.SystemAPIUser],
|
||||
hooks.MapTypeStringDecode[string, crypto.HasherConfig],
|
||||
hooks.SliceTypeStringDecode[authz.RoleMapping],
|
||||
)),
|
||||
)
|
||||
|
@ -336,6 +336,10 @@ func (l *Login) handleExternalLoginCallback(w http.ResponseWriter, r *http.Reque
|
||||
|
||||
user, err := session.FetchUser(r.Context())
|
||||
if err != nil {
|
||||
logging.WithFields(
|
||||
"instance", authz.GetInstance(r.Context()).InstanceID(),
|
||||
"providerID", identityProvider.ID,
|
||||
).WithError(err).Info("external authentication failed")
|
||||
l.externalAuthFailed(w, r, authReq, tokens(session), user, err)
|
||||
return
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ func clientSecretFromPrivateKey(key []byte, teamID, clientID, keyID string) (str
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
iat := time.Now()
|
||||
iat := time.Now().Add(-2 * time.Second)
|
||||
exp := iat.Add(time.Hour)
|
||||
return crypto.Sign(&openid.JWTTokenRequest{
|
||||
Issuer: teamID,
|
||||
|
Loading…
x
Reference in New Issue
Block a user