MCPcopy Index your code
hub / github.com/AgentOps-AI/agentops / _decode_supabase_jwt

Function _decode_supabase_jwt

app/api/agentops/auth/views.py:128–136  ·  view source on GitHub ↗

Decode the Supabase JWT to get the available data about the authenticated user.

(token: str)

Source from the content-addressed store, hash-verified

126
127
128def _decode_supabase_jwt(token: str) -> SupabaseUserData:
129 """
130 Decode the Supabase JWT to get the available data about the authenticated user.
131 """
132 # Add leeway to account for clock skew between Supabase and our server
133 user_info = jwt.decode(
134 token, SUPABASE_JWT_SECRET, algorithms=['HS256'], audience="authenticated", leeway=10
135 )
136 return SupabaseUserData(**user_info)
137
138
139def _encode_session_cookie(session: Session) -> str:

Callers 2

auth_sessionFunction · 0.85

Calls 2

SupabaseUserDataClass · 0.85
decodeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…