pearcy
pearcy
Explore posts from servers
WWasp-lang
Created by pearcy on 1/11/2024 in #đŸ™‹questions
Unable to access the Dashboard as an admin user
We are evaluating different development platforms so we can add functionality to an existing React Native app, which includes a React version. Our current app is directly connected to Supabase, so we don't have a platform to leverage. Yes, the issue is resolved.
11 replies
WWasp-lang
Created by pearcy on 1/11/2024 in #đŸ™‹questions
Unable to access the Dashboard as an admin user
Ok, thank you! Btw, everything works great. Impressed with your scripts, mutations, etc. Very easy on the dev.
11 replies
WWasp-lang
Created by pearcy on 1/11/2024 in #đŸ™‹questions
Unable to access the Dashboard as an admin user
I went back through the online docs and maybe what I am trying to do is not easily done - I am trying use out of the box functionality ant understand how the app works/ At this link: https://docs.opensaas.sh/start/guided-tour/ This instruction/example make it appear as if I can login via email as an admin user without verification (e.g. from Sendmail) with the following settings. *** this is for local dev testing. //app/.env.server # set this as a comma-separated list of emails you want to give admin privileges to upon registration [email protected] entity User settings: // app/main.wasp
isAdmin Boolean @default(true)
isEmailVerified Boolean @default(false)
isAdmin Boolean @default(true)
isEmailVerified Boolean @default(false)
auth: {
userEntity: User,
externalAuthEntity: SocialLogin,
methods: {
email: {},
google: {},
github: {},
},
onAuthFailedRedirectTo: "/",
},
auth: {
userEntity: User,
externalAuthEntity: SocialLogin,
methods: {
email: {},
google: {},
github: {},
},
onAuthFailedRedirectTo: "/",
},
I then go to the Authentition docs and it seems to indicate that this config would work.
auth: {
userEntity: User,
externalAuthEntity: SocialLogin,
methods: {
usernameAndPassword: {},
email: {},
google: {},
gitHub: {},
},
onAuthFailedRedirectTo: "/",
},
auth: {
userEntity: User,
externalAuthEntity: SocialLogin,
methods: {
usernameAndPassword: {},
email: {},
google: {},
gitHub: {},
},
onAuthFailedRedirectTo: "/",
},
and that, IF I wanted "Email Verified Auth" I would then uncomment out the "Sendmail Auth code" and use that scheme. After looking at the code it appears that if I use "email" for auth I also need to configure it with a Sendmail like provider (requires verification). Is that correct? My goal is for local dev testing so I am trying to review, test the app and to use the simplest sign in method for viewing the demo-app, account and dashboard. And I realize that dashboard should be set to "true" for "Auth" and set it to "false" just so I could see the dashboard.
route AdminRoute { path: "/admin", to: DashboardPage }
page DashboardPage {
authRequired: true,
component: import Dashboard from "@client/admin/pages/DashboardPage"
}
route AdminRoute { path: "/admin", to: DashboardPage }
page DashboardPage {
authRequired: true,
component: import Dashboard from "@client/admin/pages/DashboardPage"
}
11 replies