James Perkins
James Perkins
TTCTheo's Typesafe Cult
Created by roshen on 4/23/2023 in #questions
Using Clerk's getAuth() helper causes withClerkMiddleware to be unrecognized
72 replies
TTCTheo's Typesafe Cult
Created by roshen on 4/23/2023 in #questions
Using Clerk's getAuth() helper causes withClerkMiddleware to be unrecognized
I got my own company now it’s all good 😀
72 replies
TTCTheo's Typesafe Cult
Created by roshen on 4/23/2023 in #questions
Using Clerk's getAuth() helper causes withClerkMiddleware to be unrecognized
You probably need to talk to the Clerk team a lot has changed in 7 months and I don’t work there anymore
72 replies
TTCTheo's Typesafe Cult
Created by macaullyjames on 10/20/2023 in #questions
Clerk + OAuth scopes
No description
6 replies
TTCTheo's Typesafe Cult
Created by frenetic.ts on 4/16/2023 in #questions
Webhooks (localhost) in Clerk fails for the most part
Well the fragility comes from tunneling machines less the product. Creating and testing webhooks with Clerk should take less then an hour. In the current landscape of webhhooks using a tunneling system is basically your only option outside of developing in a reverse proxy or deploying and working from there. From a Clerk standpoint we are pretty streamlined. 1. Create webhook listening in your app. It's strongly typed. 2. Setup your local env to expose. 3. Add URL, test scenarios. 4. Done
14 replies
TTCTheo's Typesafe Cult
Created by frenetic.ts on 4/16/2023 in #questions
Webhooks (localhost) in Clerk fails for the most part
What part is cauasing friction ?
14 replies
TTCTheo's Typesafe Cult
Created by Complexlity on 9/3/2023 in #questions
Clerk + Supabase: How to handle user account
If you are using Clerk, just use the supabase integration and you can insert, update rows in your db for specific users in any table you want It’s why we built the integration…. If you just need usernames just turn it on in Clerk and have the user add their username
7 replies
TTCTheo's Typesafe Cult
Created by arete on 8/15/2023 in #questions
clerk metadata
This is correct, if you update the metadata, we need the session to be updated..This is because the client doesn't know you have made changes to the backend data. The first is user.reload() which automatically updates the session and the user data. The other is to wait for the session token to be refreshed which is every 50 seconds..
12 replies
TTCTheo's Typesafe Cult
Created by Mocha on 6/15/2023 in #questions
tRPC + Clerk: user & org info
FWIW that code is very much untested I wrote it on my phone.
43 replies
TTCTheo's Typesafe Cult
Created by Mocha on 6/15/2023 in #questions
tRPC + Clerk: user & org info
somewhere like after sign in or after sign up to double check. they are in it.
43 replies
TTCTheo's Typesafe Cult
Created by Mocha on 6/15/2023 in #questions
tRPC + Clerk: user & org info
Yeah we made this descion because our organizations are built around the notion or vercel, where 1 user can belong to 10000 orgs. Once they are active we don't forget but we have to have someone tell us which one should be the correct one.
43 replies
TTCTheo's Typesafe Cult
Created by Mocha on 6/15/2023 in #questions
tRPC + Clerk: user & org info
We do have plans for auto join and potentially serverside activation
43 replies
TTCTheo's Typesafe Cult
Created by Mocha on 6/15/2023 in #questions
tRPC + Clerk: user & org info
🙂
43 replies
TTCTheo's Typesafe Cult
Created by Mocha on 6/15/2023 in #questions
tRPC + Clerk: user & org info
FYI I work at Clerk.
43 replies
TTCTheo's Typesafe Cult
Created by Mocha on 6/15/2023 in #questions
tRPC + Clerk: user & org info
something like
export function SyncActiveOrg() {
const {orgId} = useAuth();
const { setActive, organizationList, isLoaded } = useOrganizationList();

React.useEffect(() => {
if (!isLoaded) return;

if (orgId) {
return;
}

const org = organizationList?[0].id

if (org) {
void setActive(org);
}
}, [isLoaded]);

return null;
}
export function SyncActiveOrg() {
const {orgId} = useAuth();
const { setActive, organizationList, isLoaded } = useOrganizationList();

React.useEffect(() => {
if (!isLoaded) return;

if (orgId) {
return;
}

const org = organizationList?[0].id

if (org) {
void setActive(org);
}
}, [isLoaded]);

return null;
}
43 replies
TTCTheo's Typesafe Cult
Created by Mocha on 6/15/2023 in #questions
tRPC + Clerk: user & org info
So just run a useEffect to have them attachded to it.
43 replies
TTCTheo's Typesafe Cult
Created by Mocha on 6/15/2023 in #questions
tRPC + Clerk: user & org info
the user has to be attached tot heir current active org.
43 replies
TTCTheo's Typesafe Cult
Created by Mocha on 6/15/2023 in #questions
tRPC + Clerk: user & org info
Correct.
43 replies
TTCTheo's Typesafe Cult
Created by Mocha on 6/15/2023 in #questions
tRPC + Clerk: user & org info
sessionClaims isn't a network call, its a decode. so their is zero remote requests invovled. unless I don't understand your question
43 replies