mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
fix: provide domain in session, passkey and u2f (#6097)
This fix provides a possibility to pass a domain on the session, which will be used (as rpID) to create a passkey / u2f assertion and attestation. This is useful in cases where the login UI is served under a different domain / origin than the ZITADEL API.
This commit is contained in:
@@ -39,6 +39,7 @@ func NewHumanPasswordlessAddedEvent(
|
||||
aggregate *eventstore.Aggregate,
|
||||
webAuthNTokenID,
|
||||
challenge string,
|
||||
rpID string,
|
||||
) *HumanPasswordlessAddedEvent {
|
||||
return &HumanPasswordlessAddedEvent{
|
||||
HumanWebAuthNAddedEvent: *NewHumanWebAuthNAddedEvent(
|
||||
@@ -49,6 +50,7 @@ func NewHumanPasswordlessAddedEvent(
|
||||
),
|
||||
webAuthNTokenID,
|
||||
challenge,
|
||||
rpID,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
@@ -28,6 +28,7 @@ func NewHumanU2FAddedEvent(
|
||||
aggregate *eventstore.Aggregate,
|
||||
webAuthNTokenID,
|
||||
challenge string,
|
||||
rpID string,
|
||||
) *HumanU2FAddedEvent {
|
||||
return &HumanU2FAddedEvent{
|
||||
HumanWebAuthNAddedEvent: *NewHumanWebAuthNAddedEvent(
|
||||
@@ -38,6 +39,7 @@ func NewHumanU2FAddedEvent(
|
||||
),
|
||||
webAuthNTokenID,
|
||||
challenge,
|
||||
rpID,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@ type HumanWebAuthNAddedEvent struct {
|
||||
|
||||
WebAuthNTokenID string `json:"webAuthNTokenId"`
|
||||
Challenge string `json:"challenge"`
|
||||
RPID string `json:"rpID,omitempty"`
|
||||
}
|
||||
|
||||
func (e *HumanWebAuthNAddedEvent) Data() interface{} {
|
||||
@@ -28,11 +29,13 @@ func NewHumanWebAuthNAddedEvent(
|
||||
base *eventstore.BaseEvent,
|
||||
webAuthNTokenID,
|
||||
challenge string,
|
||||
rpID string,
|
||||
) *HumanWebAuthNAddedEvent {
|
||||
return &HumanWebAuthNAddedEvent{
|
||||
BaseEvent: *base,
|
||||
WebAuthNTokenID: webAuthNTokenID,
|
||||
Challenge: challenge,
|
||||
RPID: rpID,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user