In regards to writing custom logic in the integration between plasmic auth and supabase, it shouldn’t require you to write much more code than what is already present on the example, it depends on your needs
You can find your token in the Code toolbar button.
Ok that fixed it, the protected route now works
Need to add that to the instructions in the readme for future people
As that bit was missing
seeing pages already constructed with those components in an existing project that already has a dashboard for example and editing that already made dashboard in plasmic, is a no go, correct?
Sorry, I didn’t quite follow your question, do you mean having 2 dashboard pages ?
I will add the missing instructions in the readme, thanks for reporting it
seeing pages already constructed with those components in an existing project that already has a dashboard for example and editing that already made dashboard in plasmic, is a no go, correct?
Sorry, I didn’t quite follow your question, do you mean having 2 dashboard pages ?
If I were to setup this nextjs starter project: https://github.com/usebasejump/basejump
Get it running locally. And then connect that repo to plasmic.
I would not be able to edit the default landing page it comes with, nor the “app” dashboard page in plasmic.
I could create a new landing page and a new app dashboard page, and edit those in plasmic. And I could edit components from that project which could then update the look of the dashboard page. But I wouldn’t actually drag and drop edit an already created page that wasn’t made in plasmic or made before a project was connected to plasmic.
Yes, you wouldn’t be able to directly edit the existing code of those pages in plasmic, but you could register the components that you want to keep unedited or the ones that you want to slightly modify through the code components, so that you compose the page that you desire in plasmic, but it does indeed require a bit of instrumentation
Got it. The dream is to be able to have a SaaS starter kit that a user can select from the “templates” list in plasmic’s ui. Then all they have to do is add their stripe keys and supabase keys and they have a working SaaS app they can drag and drop to edit. But it doesn’t sound like that’s currently possible
Sounds like I’d have to guide a user through the process of connecting a cloned plasmic template to some code that handles those issues.
Yes, we do have a set of templates, which we are actively working on additions, feel free to do any suggestion
But none of the templates include supabase auth or stripe for example as there is no stripe integration yet
That’s a great point, I will look on what we can do in this case
For now, one option that doesn’t require much manual changes is choosing one template, then changing it to be a custom auth app https://docs.plasmic.app/learn/auth/
I’m going through this flow now myself; the difficulity I’m running into is that I think which ever starter you start with, it needs to be the one that has Auth in it from the beginning; that way it is easier to import any other project into that project; but if you start in a project that doesn’t have auth and try to import the auth into it, it doesn’t really work because you’d have to disable auth in order to import and that defeats the purpose because you’d esentially have to deconstruct all of the auth stuff
Hi Alyssa, this is a current limitation of importing projects that have auth in them, but ideally you shouldn’t need to import a project into another to have auth settings, could you better describe which use case are you trying to achieve ?
i’m trying to achieve being lazy TBH; the Supabase Demo is code base that I know well at this point and it works and I’ve gotten authentication to work well for it using Supabase.
But when I started a new project, I didn’t start it in the Plasmic Project that related to it; so I didn’t have all of the components within Plasmic for Supabase authentication such as:
RedirectIf, SupabaseUserLogIn, SupabaseUserLogOut,SupabaseUserSession, SupabaseUserSignUp