Domains
By default, Hexclave allows all localhost paths as valid callback URLs. This is convenient for development but poses a security risk in production because attackers could use their own domains as callback URLs to intercept sensitive information. Therefore, in production, Hexclave must know your domain (e.g.,https://your-website.com) and only allow callbacks from those domains.
Follow these steps when you’re ready to push your application to production:
1
Add Your Domain
Navigate to the
Domain & Handlers tab in the Hexclave dashboard. If you haven’t configured your handler, you can leave it as the default. (Learn more about handlers here).2
Disable Localhost Callbacks
For enhanced security, disable the
Allow all localhost callbacks for development option.OAuth providers
Hexclave uses shared OAuth keys for development to simplify setup when using “Sign in with Google/GitHub/etc.” However, this isn’t secure for production as it displays “Hexclave Development” on the providers’ consent screens, making it unclear to users if the OAuth request is genuinely from your site. Thus, you should configure your own OAuth keys with the providers and connect them to Hexclave. To use your own OAuth provider setups in production, follow these steps for each provider you use:1
Create an OAuth App
On the provider’s website, create an OAuth app and set the callback URL to the corresponding Hexclave callback URL. Copy the client ID and client secret.
- Google
- GitHub
- Facebook
- Microsoft
- Spotify
- Gitlab
- Bitbucket
- LinkedIn
- X
2
Enter OAuth Credentials
Go to the
Auth Methods section in the Hexclave dashboard, open the provider’s settings, switch from shared keys to custom keys, and enter the client ID and client secret.Email server
For development, Hexclave uses a shared email server, which sends emails from Hexclave’s domain. This is not ideal for production as users may not trust emails from an unfamiliar domain. You should set up an email server connected to your own domain. Steps to connect your own email server with Hexclave:- Setup Email Server: Configure your own email server and connect it to your domain (this step is beyond Hexclave’s documentation scope).
- Configure Hexclave’s Email Settings: Navigate to the
Emailssection in the Hexclave dashboard, clickEditin theEmail Serversection, switch fromSharedtoCustom SMTP server, enter your SMTP configurations, and save.
Enabling production mode
After completing the steps above, you can enable production mode on theProject Settings tab in the Hexclave dashboard, ensuring that your website runs securely with Hexclave in a production environment.