Common Errors
I’m facing issues with logging in. What could be wrong?
This issue happens due to incorrect configuration of .env (Environment Variables). here is the fix.
We assume you have your backend up and running on the https://api.example.com and your frontend running on the https://example.com
So now look for the backend .env (Environment Variables). if you’ve used the caprover, then goto environment variables and edit accordingly.
The Environment values should look like this.
DATABASE_URL='mysql://root:12345678@YOUR_DB_HOST:3306/restropro_saas'
JWT_SECRET=restro_jwt_secret
JWT_EXPIRY=15m
JWT_EXPIRY_REFRESH=30d
# provide in ms - milliseconds => 15 minute, 30days | match the value to JWT expiry
COOKIE_EXPIRY=300000 # 15 minute
COOKIE_EXPIRY_REFRESH=2592000000 # 30 day
PASSWORD_SALT=10
FRONTEND_DOMAIN="https://example.com" # 👈 This needs to be changed
FRONTEND_DOMAIN_COOKIE="example.com" # 👈 This needs to be changed
STRIPE_SECRET=sk_test_kjsdjiowqueiqwoueqwioeukaljdlkadj
STRIPE_WEBHOOK_SECRET=whsec_wqiueqwioeuqwioeuhdjakhdkshdkjd
SMTP_HOST=sandbox.smtp.mailtrap.io
SMTP_PORT=2525
SMTP_EMAIL=asduioquweionkadhajkd
SMTP_PASSWORD=qwewiueioruiwerkhskf
ENCRYPTION_KEY=uiflow
How can i access the Superadmin URL?
You can access the superadmin with following URL. https://yoursite.com/superadmin