MCPcopy Create free account
hub / github.com/supabase/auth / FindFlowStateByAuthCode

Function FindFlowStateByAuthCode

internal/models/flow_state.go:147–157  ·  view source on GitHub ↗
(tx *storage.Connection, authCode string)

Source from the content-addressed store, hash-verified

145}
146
147func FindFlowStateByAuthCode(tx *storage.Connection, authCode string) (*FlowState, error) {
148 obj := &FlowState{}
149 if err := tx.Eager().Q().Where("auth_code = ?", authCode).First(obj); err != nil {
150 if errors.Cause(err) == sql.ErrNoRows {
151 return nil, FlowStateNotFoundError{}
152 }
153 return nil, errors.Wrap(err, "error finding flow state")
154 }
155
156 return obj, nil
157}
158
159func FindFlowStateByID(tx *storage.Connection, id string) (*FlowState, error) {
160 obj := &FlowState{}

Callers 4

PKCEMethod · 0.92

Calls 1

CauseMethod · 0.65