Convex Auth Error with Microsoft Entra
Hi Convex Community. When I try to sign in using Microsoft Entra, I keep hitting a roadblock with an HTTP action error.
Has anyone else faced this issue or have any insights on how to resolve it?
18 Replies
There should be a
__Host-<provider id>OAuthpkce
cookie set.
Can you check the network tab for whether it is being set? Any warnings in the response headers from the initial redirect to your backend?
it says __Host-microsoft-entra-id OAuthNonce, i dont know if they are the same.
Ok, so the pkce cookie is missing.
What could be the cause of the cookie missing?
@Arturo2R can you retry after upgrading to
@convex-dev/auth@0.0.43
, I made a bunch of OAuth fixesHi @Michal Srb how can i fix this problem ?
Hi @Arturo2R, it sounds like microsoft entra might not be compatible with the oauth4webapi library we're using for oauth
What is Microsoft Entra, how can we set up a repro to debug?
Could you modify the auth library code to print this JWT token?
Microsoft entra is the oauth library of microsoft. I was searching someway of debugging the JWT. I find an option in authjs to activate the debug flag. But i don't know how to access that from convex auth.
It is supported https://authjs.dev/getting-started/providers/microsoft-entra-id
Auth.js | Microsoft Entra Id
Authentication for the Web
Yep oauth rigth now has a problem with microsoft entra, and the fix merge is in process but can it may take a while. I need to patch the version that convex uses on ther server, convex supports patches ? How do i pass my patch to the server?
https://github.com/nextauthjs/next-auth/issues/8374
https://github.com/nextauthjs/next-auth/pull/9718
GitHub
AzureADProvider does not work with default (common) endpoint · Issu...
Provider type Azure Active Directory Environment "next" : N/A "react": N/A "@auth/core": "0.12.0" "@auth/sveltekit": "0.3.1" Reproduction...
GitHub
fix(providers): Handle Azure AD tenants correctly by JibbityJobbity...
☕️ Reasoning
Endpoints returned by Azure AD want us to edit the path so that each request gets routed to their proper tenant IDs.
The old implementation didn't handle this properly when usi...
Ah great research!
Could you open an issue on https://github.com/get-convex/convex-auth/issues
GitHub
Issues · get-convex/convex-auth
Library for built-in auth. Contribute to get-convex/convex-auth development by creating an account on GitHub.
If I'm going to work on this do you know how to get a Microsoft Entra account, what kind of MS setup do I need?
Hi @ballingt you just need a microsoft account register and app, and enter entra.microsoft.com register new app and create an api key, authjs have a better documentation https://authjs.dev/getting-started/providers/microsoft-entra-id.
Hi @ballingt it seems the pull request to fix the issue on authjs will take time to get approved and merged. Meanwhile my development have been halted for nearly a month.
There is a way a can modify the dependencies used by the auth convex backend. To put the patch?
Or i have to self host to do that?
I think you can publish the fork of convex auth or just pull it directly in your project
You can also set an override in your package.json @Arturo2R https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides
and you can override with a GitHub repo
Great thanks @ballingt