Skip to content

Add /v1/oauth/me legacy alias for @audius/sdk <= 14#788

Merged
raymondjacobson merged 1 commit intomainfrom
rj-oauth-me-legacy-alias
May 6, 2026
Merged

Add /v1/oauth/me legacy alias for @audius/sdk <= 14#788
raymondjacobson merged 1 commit intomainfrom
rj-oauth-me-legacy-alias

Conversation

@raymondjacobson
Copy link
Copy Markdown
Member

Summary

  • Restores GET /v1/oauth/me as a legacy alias that returns the flat DecodedUserToken shape expected by @audius/sdk versions <= 14
  • The endpoint was moved to /v1/me and reshaped to { data: User } in 3c800aa / d65f2a8, which broke deployed v14 clients still calling /v1/oauth/me after the OAuth token exchange (e.g. the production crate.is bundle, which 404s on profile fetch and surfaces "Failed to fetch user profile." to the user)
  • Shares v1Me's auth resolution but formats the response in the pre-3c800aa shape so older SDKs deserialize it correctly. New code should continue to use /v1/me

Test plan

  • go build ./api/... succeeds
  • Hit /v1/oauth/me with a PKCE access token, confirm response includes userId, handle, name, verified, sub, iat
  • Hit /v1/me with the same token, confirm response is unchanged ({ data: User })
  • Verify the production crate.is OAuth flow completes after this is deployed

🤖 Generated with Claude Code

The @audius/sdk versions <= 14 call /v1/oauth/me after the OAuth
token exchange and expect a flat DecodedUserToken-shaped response
(userId, name, handle, verified, sub, iat, optional profilePicture).
That endpoint was moved to /v1/me and reshaped to { data: User } in
3c800aa / d65f2a8, which broke deployed v14 clients (e.g. the
production crate.is bundle).

Restores the legacy handler at /v1/oauth/me, sharing v1Me's auth
resolution logic but formatting the response in the legacy shape so
older SDKs deserialize it correctly. New code should continue to use
/v1/me.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@raymondjacobson raymondjacobson merged commit 800814f into main May 6, 2026
5 checks passed
@raymondjacobson raymondjacobson deleted the rj-oauth-me-legacy-alias branch May 6, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant