MCPcopy Create free account
hub / github.com/daodst/chat / checkFlowCompleted

Function checkFlowCompleted

clientapi/routing/register.go:993–1004  ·  view source on GitHub ↗

checkFlowCompleted checks if a registration flow complies with any allowed flow dictated by the server. Order of stages does not matter. A user may complete extra stages as long as the required stages of at least one flow is met.

(
	flow []authtypes.LoginType,
	allowedFlows []authtypes.Flow,
)

Source from the content-addressed store, hash-verified

991// dictated by the server. Order of stages does not matter. A user may complete
992// extra stages as long as the required stages of at least one flow is met.
993func checkFlowCompleted(
994 flow []authtypes.LoginType,
995 allowedFlows []authtypes.Flow,
996) bool {
997 // Iterate through possible flows to check whether any have been fully completed.
998 for _, allowedFlow := range allowedFlows {
999 if checkFlows(flow, allowedFlow.Stages) {
1000 return true
1001 }
1002 }
1003 return false
1004}
1005
1006type availableResponse struct {
1007 Available bool `json:"available"`

Calls 1

checkFlowsFunction · 0.85