parthmmm
parthmmm
TTCTheo's Typesafe Cult
Created by Aryan on 4/19/2023 in #questions
How to let 2 types of users to login to my app - customers and businesses
then, on the frontend you can get the user's role and display the corresponding component/page
7 replies
TTCTheo's Typesafe Cult
Created by Aryan on 4/19/2023 in #questions
How to let 2 types of users to login to my app - customers and businesses
7 replies
TTCTheo's Typesafe Cult
Created by Aryan on 4/19/2023 in #questions
How to let 2 types of users to login to my app - customers and businesses
https://clerk.com/docs/users/user-metadata
await clerkClient.users.updateUserMetadata("user_id",{
// Read only on client, Read / Write on the server
publicMetadata:{
"role": "awesome"
},
// Read only on server and Writable on Server
privateMetadata:{
"role": "awesomesauce"
},
// Read / Write anywhere
unsafeMetadata:{
"role": "awesomeawesome"
}
});
await clerkClient.users.updateUserMetadata("user_id",{
// Read only on client, Read / Write on the server
publicMetadata:{
"role": "awesome"
},
// Read only on server and Writable on Server
privateMetadata:{
"role": "awesomesauce"
},
// Read / Write anywhere
unsafeMetadata:{
"role": "awesomeawesome"
}
});
7 replies
TTCTheo's Typesafe Cult
Created by Aryan on 4/19/2023 in #questions
How to let 2 types of users to login to my app - customers and businesses
maybe with the clerk user metadata you can create a role or type for customer/business
7 replies
TTCTheo's Typesafe Cult
Created by josh-dev627 on 4/20/2023 in #questions
Multi-tenant Saas Application
https://blitzjs.com/docs/multitenancy https://blog.bullettrain.co/teams-should-be-an-mvp-feature/ I recently did something similar to this and used a schema close to the one on blitz
4 replies