Non OpenID Connect auth
I'm having some trouble getting custom auth working. I'm trying to get it working with privy.io
The local provider seems to be set up correctly - and the app id and domain appear to be correct in the auth.config.ts file
I believe what's happening is privy's JWKS endpoint doesn't match - which I think means privy isn't openid connect compatible
Is there any way to work around this?
10 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
I ended up getting this working by creating my own openid connect compaitible api using convex http (well known, jwks endpoint etc) and then using a token conversion endpoint to create a session from the privy token and return a token for my application to use for ongoing auth
Nice! Thanks for sharing how you worked through it!
I also ran into this issue earlier. It’s not just the jwks endpoint but also their
iss
is missing https://
so it was getting rejected by the openidconnect rust library.
Did you do all of this from using httpActions or did you host it yourself separately?http actions
Give me an hour and I’ll find the code and share it here
@albert chen here's how I built it
auth.config.ts
auth.ts
cont.
cont.
auth.node.ts
then in react
cont.
If you come up with a nicer pattern than this lmk 🙏
amazing thank you
where do you get this CONVEX_HTTP_API_URL
It’s ok the dashboard. It’s the convex actions url. I think I added an env variable for it
i want to use supabase auth, but i dont know if i need same setup
Post full code, this will help lots of folks
I ended up implementing it as a cloudflare worker - more decoupled and less self-referential: https://github.com/mralbertchen/privy-oidc-wrapper
GitHub
GitHub - mralbertchen/privy-oidc-wrapper: A service deployed as a C...
A service deployed as a Cloudflare Worker that verifies a Privy Identity Token and re-issues it with three main endpoints: - mralbertchen/privy-oidc-wrapper