mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:27:31 +00:00
feat: select idp and auto register (#2336)
* faet: auto regsiter config on idp * feat: auto register on login * feat: auto register on register * feat: redirect to selected identity provider * fix: test * fix: test * fix: user by id request org id * fix: migration version and test Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -11,9 +11,10 @@ type IDPConfigWriteModel struct {
|
||||
|
||||
State domain.IDPConfigState
|
||||
|
||||
ConfigID string
|
||||
Name string
|
||||
StylingType domain.IDPConfigStylingType
|
||||
ConfigID string
|
||||
Name string
|
||||
AutoRegister bool
|
||||
StylingType domain.IDPConfigStylingType
|
||||
}
|
||||
|
||||
func (rm *IDPConfigWriteModel) AppendEvents(events ...eventstore.EventReader) {
|
||||
@@ -42,6 +43,7 @@ func (rm *IDPConfigWriteModel) reduceConfigAddedEvent(e *idpconfig.IDPConfigAdde
|
||||
rm.ConfigID = e.ConfigID
|
||||
rm.Name = e.Name
|
||||
rm.StylingType = e.StylingType
|
||||
rm.AutoRegister = e.AutoRegister
|
||||
rm.State = domain.IDPConfigStateActive
|
||||
}
|
||||
|
||||
@@ -52,6 +54,9 @@ func (rm *IDPConfigWriteModel) reduceConfigChangedEvent(e *idpconfig.IDPConfigCh
|
||||
if e.StylingType != nil && e.StylingType.Valid() {
|
||||
rm.StylingType = *e.StylingType
|
||||
}
|
||||
if e.AutoRegister != nil {
|
||||
rm.AutoRegister = *e.AutoRegister
|
||||
}
|
||||
}
|
||||
|
||||
func (rm *IDPConfigWriteModel) reduceConfigStateChanged(configID string, state domain.IDPConfigState) {
|
||||
|
Reference in New Issue
Block a user