To confirm, you tried adding the following to your .env local? NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=localhost:3000/some-path You're right afterSignInUrl doesn't exist anymore, but the above is supported and should work. If not, please can you get in touch with more detailed information? clerk.com/contact
If you use the Clerk Account Portal, yes, those pages are hosted by Clerk. If you use the AIO components I show in this video, those are hosted by you.
Constantly getting this error from clerk in the browser console: The component cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the `after SignIn` URL instead. (This notice only appears in development)
That is a great question, thank you for commenting. To *hide* sign up, tweak the SignIn component's apperance prop. Alternatively, build a custom sign in flow. In either case, remember to disable the Account Portal. Hiding is not the same as *disabling* because someone could still find a way to send a backend request and Clerk will allow it. To control who can sign up on the backend, check out the Clerk allow list feature. It's perfect for this.
hi, i have a question, if i need bulk a csv file with users data, but i upload to my supabase db first, can i create users after save data in supabase ?
Yes, that is totally possible, but there are some nuances you should be aware of. If you get in touch on the Clerk Discord with the specifics, the team will be happy to help you work through it.
I have a question how can keep a route public(not protected ) here the code i wrote but its wrong import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server'; const isPublicRoute = createRouteMatcher([ '/dashboard', ]); export default clerkMiddleware((request) => { // If the request is for a public route, bypass authentication if (isPublicRoute(request)) { return; // Do nothing and allow access } }); export const config = { matcher: [ // Skip Next.js internals and all static files, unless found in search params '/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)', // Always run for API routes '/(api|trpc)(.*)', ], };
Yes! With organizations: clerk.com/docs/organizations/roles-permissions clerk.com/blog/role-based-access-control-with-clerk-orgs Without organizations: clerk.com/docs/guides/basic-rbac
Really nice video! Exactly what I wanted! Really like you are straight to the point and no bs, UA-cam needs more of that! Cheers!
Thank you 😌
I would like to see how Clerk manages roles, such as ADMIN and CUSTOMER. It would be an interesting approach.
any mewing advice?
😅😅
So if I only need the userId its better to just use the auth() function? Also is currentUser() function cached?
Im encountering an issue where its so difficult to get my users data when they sign up into my database... do you have a tutorial for that?
The awesome @hamedbahram has a video on this 🙌🏻 ua-cam.com/video/UTjwyDuVjRM/v-deo.html
Are you using webhooks to store them?
Does clerk have a role option?
If so, is it in the free plan?
After login by clicking signin button, i logged in but sign in button is still showing
afterSignInUrl is deprecated, clerk suggests using environment variables instead, i try it bt dont work, can you explain this feature? :C
Clerk: can only accept and as its children. Any other provided component will be ignored.
Did you getting this error also?
To confirm, you tried adding the following to your .env local?
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=localhost:3000/some-path
You're right afterSignInUrl doesn't exist anymore, but the above is supported and should work. If not, please can you get in touch with more detailed information? clerk.com/contact
So, does clerk make all the webpages generated on demand from the server?
If you use the Clerk Account Portal, yes, those pages are hosted by Clerk. If you use the AIO components I show in this video, those are hosted by you.
Constantly getting this error from clerk in the browser console:
The component cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the `after SignIn` URL instead. (This notice only appears in development)
Can you try in an incognito window and see what happens?
That is a nice implementation
🙏🏻
Please help deploying this app to vercel, running into problems on vercel when the app still works on local
I'm having the same issue
how to disable the sign up button as I only want the user to sign in?
That is a great question, thank you for commenting.
To *hide* sign up, tweak the SignIn component's apperance prop. Alternatively, build a custom sign in flow. In either case, remember to disable the Account Portal.
Hiding is not the same as *disabling* because someone could still find a way to send a backend request and Clerk will allow it.
To control who can sign up on the backend, check out the Clerk allow list feature. It's perfect for this.
how to redirect after sign up?
hi, i have a question, if i need bulk a csv file with users data, but i upload to my supabase db first, can i create users after save data in supabase ?
Yes, that is totally possible, but there are some nuances you should be aware of. If you get in touch on the Clerk Discord with the specifics, the team will be happy to help you work through it.
@@bookercodes oooh thanks, i will keep in mind
I have a question how can keep a route public(not protected ) here the code i wrote but its wrong
import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server';
const isPublicRoute = createRouteMatcher([
'/dashboard',
]);
export default clerkMiddleware((request) => {
// If the request is for a public route, bypass authentication
if (isPublicRoute(request)) {
return; // Do nothing and allow access
}
});
export const config = {
matcher: [
// Skip Next.js internals and all static files, unless found in search params
'/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)',
// Always run for API routes
'/(api|trpc)(.*)',
],
};
createRouterMatcher returns an isPrivateRoute method, not isPublicRoute
Hey i found a bug in clerk app where I can complaint for the bug?
You can submit a ticket here: clerk.com/contact
8:43 lol you said next authentication instead of clerk authentication
Next Auth for the win lol
Authentication with* Next (with Clerk or Next Auth)😄
Does clerk have a role option?
If so, is it in the free plan?
Yes!
With organizations:
clerk.com/docs/organizations/roles-permissions
clerk.com/blog/role-based-access-control-with-clerk-orgs
Without organizations:
clerk.com/docs/guides/basic-rbac