zor
zor
CCConvex Community
Created by zor on 12/27/2024 in #general
zorrr99's Thread
I'd not be able to code this system. and the green box specifically confused me. I am putting much effort to learn how authentication exactly mean and typically. How and when system decides get positive return from the API ... Called pipeline I guess. I cannot exactly connect the dots and then I spend more time. I mean I understand what is what but it feels like black box and everything works in sync magically
4 replies
CCConvex Community
Created by zor on 9/4/2024 in #support-community
Are there any examples of best security practices for implementing role-based access control (RBAC)
Am I just supposed to use simply useQuery and not think much?
8 replies
CCConvex Community
Created by zor on 9/4/2024 in #support-community
Are there any examples of best security practices for implementing role-based access control (RBAC)
Not necessarily Clerk. Assume any auth
8 replies
CCConvex Community
Created by zor on 7/15/2024 in #support-community
Clerk authenticates, Convex do user management and features. Convex stores user data
No description
39 replies
CCConvex Community
Created by zor on 7/15/2024 in #support-community
Clerk authenticates, Convex do user management and features. Convex stores user data
Probably making the table names identical will just work to replace(upsert)?
39 replies
CCConvex Community
Created by zor on 7/15/2024 in #support-community
Clerk authenticates, Convex do user management and features. Convex stores user data
Oh makes sense
39 replies
CCConvex Community
Created by zor on 7/15/2024 in #support-community
Clerk authenticates, Convex do user management and features. Convex stores user data
Sounds good. I like the 1. Maybe I won't need whole user as same as what I receive from Clerk. In the user settings, I will update the Convex data and the sync system will send the updated convex user to Clerk anyways. No matter what, Convex data is the single source of truth and hopefully there won't occur weird bugs such as, in the user settings, user is alerted to verify phone number, user verifies on Clerk and Convex still thinks it is not verified etc. but it is pretty unlikely I guess and if occurs, there will be a simple way to fix it like a normal problem. Well, how do Convex tell Clerk to do something like revocating the user(I guess basically it is ending a session and I'd get the session Id by Convex(which gets from the JWT token that Clerk gives) and end with Clerk's function)and how do Convex send the updated user, maybe I got dumb with the overwhelm but in the case user table attribute names are going to be different than Clerk, at least not identical. How the Clerk will get sync with the user data with different attribute names?
39 replies
CCConvex Community
Created by zor on 7/15/2024 in #support-community
Clerk authenticates, Convex do user management and features. Convex stores user data
I am using Clerk's UIs completely at the moment. The goal is using custom UIs and custom user settings
39 replies
CCConvex Community
Created by zor on 7/15/2024 in #support-community
Clerk authenticates, Convex do user management and features. Convex stores user data
I hope not bothering you. Thank you really so much 🫶
39 replies
CCConvex Community
Created by zor on 7/15/2024 in #support-community
Clerk authenticates, Convex do user management and features. Convex stores user data
If that's something I probably won't need and I shouldn't be worried about. I am okay to not access it or hybridly use Clerk functions on these specific cases if I should use
39 replies
CCConvex Community
Created by zor on 7/15/2024 in #support-community
Clerk authenticates, Convex do user management and features. Convex stores user data
So I should keep that in my Convex user table. Then how much from the UserJSON of Clerk? last_active_at: number | null; banned: boolean; Should I ignore these better-to-be-in-Convex Clerk's attributes or keep them in sync(likely)? Another example, Clerk has external_accounts: ExternalAccountJSON[];
export interface ExternalAccountJSON extends ClerkResourceJSON {
object: typeof ObjectType.ExternalAccount;
provider: string;
identification_id: string;
provider_user_id: string;
approved_scopes: string;
email_address: string;
first_name: string;
last_name: string;
image_url?: string;
username: string | null;
public_metadata?: Record<string, unknown> | null;
label: string | null;
verification: VerificationJSON | null;
}
export interface ExternalAccountJSON extends ClerkResourceJSON {
object: typeof ObjectType.ExternalAccount;
provider: string;
identification_id: string;
provider_user_id: string;
approved_scopes: string;
email_address: string;
first_name: string;
last_name: string;
image_url?: string;
username: string | null;
public_metadata?: Record<string, unknown> | null;
label: string | null;
verification: VerificationJSON | null;
}
Should I have this on my Convex user table as well? I thought about dual-sided sync as well. I would sync Clerk ➡️ Convex with webhook which I already have that setup and for the Convex ➡️ Clerk I would do API call to Clerk(I don't know how and if possible). Or do I use Clerk's functions such as createBackupCode() from Clerk to update it on Clerk as well?
39 replies
CCConvex Community
Created by zor on 7/15/2024 in #support-community
Clerk authenticates, Convex do user management and features. Convex stores user data
You would be building all of the device tracking, revocation, etc yourself. Convex doesn't have any out-of-the-box features for these things, so if you want them soon I'd start with Clerk, and if you later want to build a more custom version of them you can build them from scratch later (or maybe find some library / component that works with Convex) re: performance, your user queries will be alongside your other Convex data, so it'll be faster in that regard. However, there is a bit of a waterfall of requests: Clerk says you're signed in and the client gets the token Convex sends the token up, then calls something like storeUser and a user is created / verified that it exists Your functions that depend on auth run
I sent these quotes if it helps to understand the benefits and motivation
39 replies