Introduction
The Account Portal offers a comprehensive solution for managing user authentication and profile management in your web application and is the fastest way to add Clerk's authentication to your application with minimal code required.
Getting started
To use the Account Portal, add Clerk to your application and protect your pages. Any time an unauthenticated user attempts to access a protected page in your application, they will automatically get redirected to the Account Portal pages to Sign in.
Depending on your choice of framework, you can redirect to them from your application using our NextJS authMiddleware, React Control Components or ClerkJS SDK.
Features overview
Dedicated hosted pages
For every instance, Clerk offers sign-up, sign-in, and user profile pages out of the box. Additionally, if you are using our Organizations feature, you will also get the organization profile page
For development instances, Clerk will issue you a domain on "lcl.dev". In production, by default, the URLs for your Account Portal are the following:
https://accounts.[your-domain].com/sign-in
https://accounts.[your-domain].com/sign-up
https://accounts.[your-domain].com/user
https://accounts.[your-domain].com/organization
https://accounts.[your-domain].com/create-organization
Note that when you go to production, this is why Clerk requires adding the accounts
CNAME record as part of your DNS settings. If you do not want to do this and are using your own components, you may disable the Account Portal pages via the 'Danger' tab.
Custom redirects
With the Account Portal, we default the user back to where they came from after a successful auth event (sign in or sign up) and pass this parameter via a redirect_url
query param.
For situations where this may not be possible, Clerk defaults to your application homepage and expects the appropriate redirects will kick in. You can also specify default fallbacks directly in the dashboard as well.
- After sign-up fallback: Define the landing page or a specific section of your application where users should be redirected to after successfully creating a new account.
- After sign-in fallback: Define the landing page or a specific section of your application where users should be directed after a successful sign-in.
- After Logo Click: Specify the destination page or action users should be redirected to after they click on your logo from the Account Portal pages.
Customization
The Account Portal also offers a limited set of capabilities to align the visual appearance of the pages with your application's branding and design. This includes the ability to customize the colors, font and button weights.
If you’d rather a precise level of customization through code to match your styling - it is recommended that you use Clerk's embedded components leveraging the appearance prop instead.
Clerk is actively working on improving the capabilities here, so if you have any specific requests - please reach out!