WaspW
Wasp2y ago
pearcy

Unable to access the Dashboard as an admin user

When I spin up a open-saas repo (https://github.com/wasp-lang/open-saas.git) everything works swimmingly except I am unable to access to the Dashboard as an admin user.
-- running locally, Docker Postgres, dev

env changes:
// app/.env.server
ADMIN_EMAILS=my@email.com

// app/main.wasp
isAdmin Boolean @default(true)

Expected behavior:
After these env changes, I signup and should have access to the Dashboard.
-- there is nothing in my account in nav so enter /admin directly in the URL.

If I change all the values to "false", I can get access to the Dashboard but when I go back to account or demo-app it routes me to the login screen.
// app/main.wasp
```
route AdminRoute { path: "/admin", to: DashboardPage }
page DashboardPage {
authRequired: false,
component: import Dashboard from "@client/admin/pages/DashboardPage"
}
GitHub
An open-source SaaS app template with superpowers. Contribute to wasp-lang/open-saas development by creating an account on GitHub.
Was this page helpful?