mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-21 06:54:25 +00:00
# Which Problems Are Solved As part of #11035 , this PR implements the Passkey check logic for session validation # How the Problems Are Solved - Refactor webauth FinishLogin to support new domain model - Add webauth config to defaults - Implement passkey check logic and tests - Manual transaction management to avoid stalling the DB while FinishLogin callback is executed - Update passkey Type condition to allow passing a text operation (equal, contains, etc..) # Additional Context This is a cherry-picked PR + minor changes, coming from https://github.com/zitadel/zitadel/pull/11164 - Relates to #11035 --------- Co-authored-by: Fabienne Bühler <[email protected]> Co-authored-by: Gayathri Vijayan <[email protected]>
16 lines
366 B
Go
16 lines
366 B
Go
package convert
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
session_grpc "github.com/zitadel/zitadel/pkg/grpc/session/v2"
|
|
)
|
|
|
|
func CheckPasskeyGRPCToDomain(checkPasskey *session_grpc.CheckWebAuthN) ([]byte, error) {
|
|
if checkPasskey == nil || checkPasskey.GetCredentialAssertionData() == nil {
|
|
return nil, nil
|
|
}
|
|
|
|
return json.Marshal(checkPasskey.GetCredentialAssertionData())
|
|
}
|