I'm trying to integrate Appwrite authentication with Convex backend. I believe that Convex requires an OpenID Connect ID tokens, but I can't find a way to get an OIDC-compliant ID token from Appwrite.
Current Setup: -- Successfully authenticating with Appwrite -- Can get JWT tokens from Appwrite -- Need to pass these to Convex Current Appwrite JWT format:
{
sub: '67881a4942568fc06e77',
iss: 'https://cloud.appwrite.io/v1',
aud: '672d1490001071c7b24b',
iat: 1736994725,
exp: 1736998325
}
Code:
// src/components/providers/auth-provider.tsx
export function useAuthFromAppwrite() {
const fetchAccessToken = useCallback(async ({ forceRefreshToken }: { forceRefreshToken: boolean }) => {
try {
const { jwt } = await account.createJWT();
return jwt;
} catch (error) {
console.error("Token creation failed:", error);
return null;
}
}, []);
return {
isLoading: false,
isAuthenticated: true,
fetchAccessToken
};
}
error from Convex:
Failed to authenticate: "Could not parse as id token", check your server auth config
Does Appwrite support generating OpenID Connect ID tokens?
It's a React based app and I do have part of the project (API's, Database) working in Appwrite. Looking to migrate but need interim solution until I can get the rest migrated over.
Recommended threads
- Android SDK: Kotlin null Value Not Updat...
Hi team, I think you should check the Android SDK implementation once, as it seems to have an issue handling Kotlin **null** values. For example: When I send:...
- Can't connect GitHub — 500 error at the ...
Appwrite Cloud, Pro plan, SFO region. All my Git connections vanished today — Sites and all 15 Functions now show no repository connected. When I try to add a ...
- GB Hours IS NOT resetting
Hi, I was checking my usage and noticed that all of my usage quotas were reset on August 20, 2026, when my billing cycle renewed. Everything else appears to ha...