MCPcopy Index your code
hub / github.com/supabase/auth / GetUser

Function GetUser

internal/api/shared/context.go:24–33  ·  view source on GitHub ↗

GetUser reads the user from the context - shared implementation

(ctx context.Context)

Source from the content-addressed store, hash-verified

22
23// GetUser reads the user from the context - shared implementation
24func GetUser(ctx context.Context) *models.User {
25 if ctx == nil {
26 return nil
27 }
28 obj := ctx.Value(UserKey)
29 if obj == nil {
30 return nil
31 }
32 return obj.(*models.User)
33}
34
35// WithUser adds the user to the context - shared implementation
36func WithUser(ctx context.Context, u *models.User) context.Context {

Callers 6

getUserFunction · 0.92
UserListOAuthGrantsMethod · 0.92
UserRevokeOAuthGrantMethod · 0.92
OAuthUserInfoMethod · 0.92
OAuthServerConsentMethod · 0.92

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…