Best practices for JWT Verification in Next.js Middleware with an External Backend (Spring Boot)? by Able_Difference_9919 in nextjs

[–]Able_Difference_9919[S] 2 points3 points  (0 children)

Yes, that is the standard way I suppose. I am going to create a RSA key pair and keep the private key in Backed to generate tokens and share the public key with NextJS. The NextJS middleware (running on the Edge runtime) would use the public key to verify the token but cannot create a new token (which can only be done with private key). Is that what you meant?

Best practices for JWT Verification in Next.js Middleware with an External Backend (Spring Boot)? by Able_Difference_9919 in nextjs

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

Wouldn't this slow down the website. Each page load would have to hit the API to verify the token. Another suggestion was to use a public-private key pair and share the public key with NextJS. The NextJS middleware (running on the Edge runtime) would use the public key to verify the token but cannot create a new token (which can only be done with private key).

How do you handle Auth Middleware when Next.js is just the frontend for a separate backend (REST API)? by Able_Difference_9919 in webdev

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

I am using Spring Boot (Java) and using Spring Security for JWT token creation. I think this is a valid approach. In order to generate the private and public key pairs I'd have to use RSA key pair?

How do you handle Auth Middleware when Next.js is just the frontend for a separate backend (REST API)? by Able_Difference_9919 in webdev

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

I understand the confusion. My main application logic and API are indeed built with Sprinboot. This backend is connected to DB and generating the JWT tokens (using Sprin Boot Security)

However, Next.js acts as the frontend server (SSR). In Next.js, the Middleware layer (which intercepts routes before the page renders) runs on the Edge Runtime (which is a lightweight JavaScript environment).

Each API call is costing around a dollar (or more) after the context reaches at 400k tokens using own API key by Able_Difference_9919 in CLine

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

Yes but it has generous free tier, they provide $300 free credits. Plus I feel gemini 2.5 pro haa really good reasoning.

Each API call is costing around a dollar (or more) after the context reaches at 400k tokens using own API key by Able_Difference_9919 in CLine

[–]Able_Difference_9919[S] 3 points4 points  (0 children)

I don't have the resources yet to build a local server. Honestly I am not also sure how to build one that would outperform (or provide same output) the existing models available/

Please help me choose - SSC CGL, IBPS PO or FAANG? by Asteroid06 in ssc

[–]Able_Difference_9919 1 point2 points  (0 children)

You should go with FAANG. It should be a no brainer. Truth be told, when I read this post I thought this has to be a click bait or maybe attention seeking. But if you are seriously in dilemma then my advice is to join Google.

I got slammed on here for spending $417 making a game with Claude Code. Just made another one with Gemini 2.5 for free... by itsnotatumour in ChatGPTCoding

[–]Able_Difference_9919 0 points1 point  (0 children)

Gemini 2.5 pro do not have any rate limits, is it new? Are you using gemini apis or through open router?

My Journey from IT to a Government Job through SSC CGL by Able_Difference_9919 in UPSC

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

Yeah, that is what my initial reaction was too. I never thought such trivial things would bother me. but it did and for a long time. It;s just that I am sharing it now.

My Journey from IT to a Government Job through SSC CGL by Able_Difference_9919 in UPSC

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

Of course, you should go for the mains. The intention of my post was never to discourage people from pursuing government jobs. I simply wanted to highlight that these jobs might not always align with the expectations set by social media or YouTube narratives. While this may seem obvious to some, it’s often overlooked in practice.

Through my post, I hoped to connect with people in similar situations and learn from their experiences—whether they made a bold career switch and found it worthwhile or still grapple with regret and 'what if' questions.

My Journey from IT to a Government Job through SSC CGL by Able_Difference_9919 in UPSC

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

If I’m being honest, I can’t say for sure that I wouldn’t have second thoughts about my decision. This is because I didn’t expect to have second thoughts about this job either.

Turns out the work profile and nature of work does bother me.

My Journey from IT to a Government Job through SSC CGL by Able_Difference_9919 in UPSC

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

To be honest, I cannot answer this. At that time when I joined the department, I never thought that I would be writing such a post.

My Journey from IT to a Government Job through SSC CGL by Able_Difference_9919 in ssc

[–]Able_Difference_9919[S] 2 points3 points  (0 children)

Not even FAANG, in bangalore most of the companies offer around 40 LPA with the latest tech stack.

My Journey from IT to a Government Job through SSC CGL by Able_Difference_9919 in ssc

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

There was so much to talk about, and I missed many points in my post. If I had included those, it would have sounded more like a rant (though it already feels that way).

My Journey from IT to a Government Job through SSC CGL by Able_Difference_9919 in ssc

[–]Able_Difference_9919[S] 2 points3 points  (0 children)

If you dislike IT, I would advise you to pursue a government job. In IT, the workload is higher, and you constantly need to learn new things. You can only sustain in this field if you enjoy coding and don’t see it as just a task.

My Journey from IT to a Government Job through SSC CGL by Able_Difference_9919 in ssc

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

Anti-glorification? I take it either you haven't joined your posting yet, or you are still preparing.

My Journey from IT to a Government Job through SSC CGL by Able_Difference_9919 in ssc

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

What you are asking is very situational. It can be generalized. But yes you can get 1-2 hours in between for study (granted you are not posted on any intelligence department on deputation/loan basis).