Atila
Atila
SSolidJS
Created by smr.gg on 12/6/2024 in #support
actions: I can't tell if this is a bug or a feature
wow!!! Very thorough! Thanks a lot.
25 replies
SSolidJS
Created by smr.gg on 12/6/2024 in #support
actions: I can't tell if this is a bug or a feature
it looks like this has never had an issue created in the repo. I'll check the reproduction and try to write up an issue for us to track this properly (even if it's a wontfix, it's good to have it tracked within the repo) https://github.com/solidjs/solid-router/issues if anyone has time to do it before me, I'd appreciate! 🙏
25 replies
SSolidJS
Created by Gyome on 12/5/2024 in #support
Component type
this: const MyTsComponent() is definitely wrong and not supported in Solid in any way... Definitely a typo. can you create an issue or make a PR to fix or give us a url of where you found this ?
14 replies
SSolidJS
Created by Lady Bluenotes on 11/28/2024 in #support
`React is not defined` error from a Solid library
that's not what I meant. For sure it won't impact anything. What I'm saying is when they build for distribution, if the tsconfig points to React to parse, they will bundle React code in the /dist
11 replies
SSolidJS
Created by Lady Bluenotes on 11/28/2024 in #support
`React is not defined` error from a Solid library
maybe I'm wrong, but I think in this particular case the tsconfig.json has an impact. Because the JSX parsing is an implicit import. I went to tsconfig.json because if the value isn't preserve and the import path isn't specified as solid, it will imply React - and that where a React import could land in the output js. Does this not make sense, Erik?
11 replies
SSolidJS
Created by sh03 on 11/29/2024 in #support
Using zod to validate env vars
for TS, you can also extend the global.d.ts like such:
declare namespace NodeJS {
interface ProcessEnv {
readonly NODE_ENV: "development" | "production";
readonly AUTH_URL: string;
readonly VITE_AUTH_PATH: string;
readonly GITHUB_CLIENT_ID: string;
readonly GITHUB_CLIENT_SECRET: string;
readonly AUTH_SECRET: string;
}
}

interface ImportMetaEnv {
readonly VITE_AUTH_PATH: string;
}
declare namespace NodeJS {
interface ProcessEnv {
readonly NODE_ENV: "development" | "production";
readonly AUTH_URL: string;
readonly VITE_AUTH_PATH: string;
readonly GITHUB_CLIENT_ID: string;
readonly GITHUB_CLIENT_SECRET: string;
readonly AUTH_SECRET: string;
}
}

interface ImportMetaEnv {
readonly VITE_AUTH_PATH: string;
}
20 replies
SSolidJS
Created by sh03 on 11/29/2024 in #support
Using zod to validate env vars
the instructions in that post are for any JS app, so it works the same way for Solid
20 replies
SSolidJS
Created by Lady Bluenotes on 11/28/2024 in #support
`React is not defined` error from a Solid library
the package looks alright, maybe try to replicate the error in a sample app and see if it goes off again
11 replies
SSolidJS
Created by sh1man on 11/26/2024 in #support
Can anyone show code examples of how the permissions work?
98 replies
SSolidJS
Created by sh1man on 11/26/2024 in #support
Can anyone show code examples of how the permissions work?
you didn't ask anything. we had to imply.
I couldn't find a single example. In discord. Perhaps you have any ideas on this. I have never done permissions
But ok, I also sent you a link for a tutorial with the timestamp where I implemented authorization access to a url... 🤷
98 replies
SSolidJS
Created by sh1man on 11/26/2024 in #support
Can anyone show code examples of how the permissions work?
you didn't write the word, but you must understand that you can't have or designate roles to a user without knowing who the user is (that's called authentication), so once you bring "roles" and "permissions" up, the fact that you must have authentication is, in fact, implied. As I wrote in my very first message in this thread:
in order to Authorize/Block a user you must have them Authenticated
and again, on my first message on this thread:
it's all about your db architecture and relationships to define what resource a user has or doesn't have access to.
the quote above is about "permissions", though I don't write the word. The abstraction you have in that screenshot with <AllowedAccess> is not something we SolidStart has built-in. I already told you how to implement that:
what we do is making storing and handling the authentication and, once you figured out what you want to do with the user you can use SolidStart to redirect or deliver the resource to them.
the logic for labelling the role and granting/removing permissions needs to be done on your end.
98 replies
SSolidJS
Created by ChrisThornham on 11/26/2024 in #support
Help Configuring SolidStart with Capacitor JS
if you want any help, give us a shout... I also created a template, it still needs updating from the last beta to stable 2.0 https://github.com/atilafassina/quantum
6 replies
SSolidJS
Created by sh03 on 11/26/2024 in #support
OAuth / OpenID Connect
MediaKit Auth is great I'm publishing a video this week about that, meanwhile there's the docs: https://mediakit-taupe.vercel.app/auth/install
21 replies
SSolidJS
Created by sh1man on 11/26/2024 in #support
Can anyone show code examples of how the permissions work?
once you have the user authenticated, it's just about either delivering the resource or sending them somewhere else. Solid-Router makes it easy that you can just throw a redirect at any point
98 replies
SSolidJS
Created by sh1man on 11/26/2024 in #support
Can anyone show code examples of how the permissions work?
we do some degree of Row-Level Security to protect routes or not, thus redirecting the user or not. In this video I rolled auth from scratch, but I didn't get into details about Row-Level Security (permissions) because from a SolidStart perspective there's nothing to be done in that sense, I was just showing the Application layer and not the Database layer https://www.youtube.com/watch?v=IXvLskm6pxg&t=1s
98 replies
SSolidJS
Created by sh1man on 11/26/2024 in #support
Can anyone show code examples of how the permissions work?
I think what @TaQuanMinhLong means is that in order to Authorize/Block a user you must have them Authenticated. That's where the session cookie comes in hand. You authenticate and store that information in a HTTP-only cookie (http only because it's safer from MITM attacks). With that done, it's all about your db architecture and relationships to define what resource a user has or doesn't have access to. SolidStart doesn't have any affordances for that part... what we do is making storing and handling the authentication and, once you figured out what you want to do with the user you can use SolidStart to redirect or deliver the resource to them.
98 replies
SSolidJS
Created by ChrisThornham on 11/26/2024 in #support
Help Configuring SolidStart with Capacitor JS
Yeah. That's a common issue with all hybrid app bundlers. Because of that, in Tauri we're exploring a way to sidecar a Node.js runtime so the SSR parts and bundles can run pretty much in the same way that you deploy a web app. meanwhile, for Tauri we usually recommend this kind of apps to use a remoteWindow and so it runs the fullstack app in a native window, then you can just check the env from your app and make the native calls. I'm sure Capacitor would have an alternative like that.
6 replies
SSolidJS
Created by sh03 on 11/24/2024 in #support
Background jobs in Solid Start
gotcha! I'll make sure we have that in the SolidStart docs when we mention it
37 replies
SSolidJS
Created by sh03 on 11/24/2024 in #support
Background jobs in Solid Start
37 replies
SSolidJS
Created by sh03 on 11/24/2024 in #support
Background jobs in Solid Start
you'll probably need to install nitro as a direct dependency if Vinxi doesn't re-export defineTask for you. (lots of these methods are reexported from Nitro or h3 just to make things more ergonomic - but you're now at the cutting-edge) ping @nksaraf , maybe that's something we'd want to do for Vinxi / :start: too?
37 replies