Supabase auth example#4066
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d2e2773182
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| auth = SupabaseProvider( | ||
| project_url=SUPABASE_URL, | ||
| base_url=BASE_URL, | ||
| ) |
There was a problem hiding this comment.
Configure SupabaseProvider with the JWT algorithm you require
This example tells users to migrate to asymmetric RS256 keys, but SupabaseProvider(...) is instantiated without algorithm, so it defaults to ES256. If users follow the setup guidance and Supabase issues RS256 tokens, token verification will fail and the OAuth flow cannot complete. Set algorithm="RS256" here (or update the setup guidance to match ES256) so verifier and issuer are consistent.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I don't know if this comment is correct, however I can say that the code in this PR definitely works on my machine. In Supabase, my JWT signing key is listed as: "ECC (P-256)"
| ### Step 3: Run FastMCP Client | ||
|
|
||
| ``` | ||
| python client.py |
There was a problem hiding this comment.
Invoke the client via uv so dependencies resolve
After uv sync, the README instructs running python client.py, which uses the system interpreter unless the user manually activates .venv. In a fresh setup this commonly raises ModuleNotFoundError for fastmcp/dotenv; using uv run python client.py is required for the documented workflow to work reliably.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I updated the readme to tell the user to source .venv/bin/activate
|
cc @aaazzam - since it looks like you worked on the original PR. Any chance you could take a look and let me know what would be needed to get this example merged? |
|
A few things that stand out:
We're happy to accept a Supabase example, but it needs to arrive fully formed — walkthrough verified end-to-end against a real Supabase project, no debug scaffolding, structurally consistent with the other auth examples in the repo. Once it's ready for the world, ping us and we'll take a look. |
|
tl;dr: CI failed on a flaky timing-sensitive test ( The only failing job was This PR only adds files under Failure excerpt🤖 Generated with Claude Code |
|
Thanks for taking a look @jlowin, I will try to find the time to make the changes.
Do you recommend any particular auth example that is most similar to Supabase, or are they all about the same? |
Description
Complete working example of using Supabase Auth. I found this to be a very non-trivial task, so hopefully this will save someone the iterations I had to go through!
Closes #4063
Contribution type
Checklist
But to be fair I filed it!
I have read CONTRIBUTING.md
I have added tests that cover my changes
This is an example. Automated tests probably not appropriate.
uv run prek run --all-filesand all checks passGuilty as charged, except for the README.md which was entirely hand-crafted.
Happy to clean up the AI slop, but I'd like to get a round of feedback before I go too deep on that. I just want to make sure the PR will be accepted in it's current form, or if there is an example template I should follow for an example like this.