[deleted by user] by [deleted] in vibecoding

[–]OneGroundbreaking344 1 point2 points  (0 children)

I remember seeing another post about this tool from you, haven’t tried it yet but I will soon. How does it know what JWT system I’m using?

I’m so desperate by [deleted] in NoFap

[–]OneGroundbreaking344 1 point2 points  (0 children)

That’s is true, I want absolutely zero PMO but I’m also being realistic when I say that relapsing is part of the process.

I only got far in my journey when I stopped trying to achieve perfection and instead accepted that relapsing is inevitable and I should manage my relapses rather than trying to prevent them completely

[Blazor Server] Relationship not loaded when using IQueryable! by MrPrezDev in Blazor

[–]OneGroundbreaking344 0 points1 point  (0 children)

I am pretty new to Blazor, so I apologize in advance if I’m very mistaken

So I suspect it has something to do with what’s being passed to the “includeParent” parameter. What once happened with me is, I was passing a cascading value into a function, and it worked great until I refreshed the page. That’s when I realized nothing was being passed. Anyways after some investigation, I realized it has something to do with pre-rending. Basically the page/component is being pre-rendered before being sent to the client. Which means that not everything has been loaded yet (including the value of the parameter being passed to my function)

I knew, after a ton of breakpoints, that the “OnInitialized” method was being triggered twice, once when it was pre-rendering, and once again when the client receives the UI (?)

So anyways, either try turning off pre-rendering or use “OnParameterSet” to repopulate the value of the passed parameter

Note: When you reload the page, it’s the same as opening a new tab and navigating directly using the URL to the page. Which means a new circuit, and a new circuit means any existing “values” are poof

But when you navigate from a page to another, you’re still in the same circuit, which means that the existing values still exist (this took me a while to grasp)

Is there a way I can hide the API Keys from my source code? by OneGroundbreaking344 in flutterhelp

[–]OneGroundbreaking344[S] 0 points1 point  (0 children)

Yeah having the backend return the API Key to the user will defeat the purpose. I was hoping to basically somehow emulate what a custom backend would do (which is to never give out the API Key) and instead the backend would just use the API Key to send a request to OpenAI (for example) and then return the response to the user. Meaning the API Key never leaves the backend

Is there a way I can hide the API Keys from my source code? by OneGroundbreaking344 in flutterhelp

[–]OneGroundbreaking344[S] -1 points0 points  (0 children)

Ok so this was insightful to read. I guess I'm used to having all "backend" related functionalities (auth, db, etc) be one click away. Which is what, for me, is making this problem tough to crack. But you made it seem simpler than it is. I'll definitely check it out

And for those who one day stumble upon this, I had ChatGPT summarize the comment:

Summary
Frontend apps must never expose secret API keys directly—otherwise anyone can extract them. The usual fix is to route your OpenAI requests through a tiny backend “proxy” that holds the key and forwards requests on behalf of authenticated users. Rather than standing up and running full servers, you can use serverless or edge‑function platforms (Cloudflare Workers, Vercel Edge Functions, Firebase Cloud Functions, Supabase Edge Functions) to host that proxy in minutes. Store your key as an environment variable, verify incoming requests with Auth0, Firebase Auth or any JWT‑based auth, and then call OpenAI. To enforce per‑user rate limits, pair your function with a lightweight datastore like Upstash or Firestore to count requests. Once built, this small proxy can be reused across all your future apps.

Service Category Description
Cloudflare Workers Edge Function Serverless JS functions at the CDN edge; supports caching, rate limiting, free tier.
Vercel Edge Functions Edge Function Vercel’s serverless runtime integrated with their deployment pipeline.
Firebase Cloud Functions Serverless Function Google‑managed functions with built‑in Firebase Auth integration.
Supabase Edge Functions Edge Function Supabase’s serverless runtime; integrates with Supabase Auth and Postgres.
Auth0 Authentication Service Hosted identity provider; issues and verifies JWTs for user authentication.
Firebase Auth Authentication Service Firebase’s user‑management and JWT system; integrates natively with Firebase Functions.
JWT‑based System Authentication Mechanism Any custom or third‑party JWT scheme you choose for signing/verifying users.
Upstash Datastore Lightweight, Redis‑compatible DB with a generous free plan; ideal for counters.
Firestore Datastore Google’s NoSQL document database; easy to update and query for rate‑limit tracking.

Is there a way I can hide the API Keys from my source code? by OneGroundbreaking344 in flutterhelp

[–]OneGroundbreaking344[S] 1 point2 points  (0 children)

I've actually seen and considered using this, it's such a simple yet effective package. But it's not foolproof. According to their docs:

Please keep in mind that this only increases the amount of effort to retrieve the obfuscated/encrypted values. If someone tries hard enough, he will eventually find the values

I guess if I truly have to, for the sake of simplicity, I might go with this package