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

Function getTargetUser

internal/api/context.go:84–93  ·  view source on GitHub ↗

getTargetUser reads the user from the context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

82
83// getTargetUser reads the user from the context.
84func getTargetUser(ctx context.Context) *models.User {
85 if ctx == nil {
86 return nil
87 }
88 obj := ctx.Value(targetUserKey)
89 if obj == nil {
90 return nil
91 }
92 return obj.(*models.User)
93}
94
95// getFactor reads the factor id from the context
96func getFactor(ctx context.Context) *models.Factor {

Callers 2

linkIdentityToUserMethod · 0.85

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected