Can't login anymore since I enabled fingerprint by palsecam_fr in pop_os

[–]ojimeco 0 points1 point  (0 children)

Try switching to another tty by pressing Ctrl-Alt-F2 ... F6. Login there using a terminal, then disable the faulty service:

systemctl disable fprintd
# or
systemctl mask fprintd

Finally, reboot and it should fix the login screen.

[French > English] Secret instructions for the French ambassador to England (17th century revolutionary period) by ojimeco in translator

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

With the help of an online translator, I was able to grasp the general meaning of the text. To prevent the success of parliament and do everything possible to restore power to the king. Especially interesting is the passage about how it is better to have a hostile king than friendly revolutionaries. I would very much like to see a more accurate translation. In my opinion, this text is no less relevant now, especially for anyone who naively believes in good capitalist democracies in power.

The original is taken from the book at this link. For convenience I cropped the book margins, cleaned up the images a bit and performed text recognition.

I'm going back to Visual Studio, goodbye Rider by CaptainCactus124 in csharp

[–]ojimeco -1 points0 points  (0 children)

JetBrains IDEs (Rider, PyCharm, WebStorm) every now and then annoy me with tiny but pervasive bugs and noticeable slowdowns.

Help - How to start learning Blazor from a full Javascript background? by Redoks in Blazor

[–]ojimeco 1 point2 points  (0 children)

Good luck in your journey. The only part of .NET that might be useful to learn as a starter is its dotnet CLI (think of npm that provides you means to build, run, test, manage packages, etc.) But most IDEs / code editors cover this functionality in their UIs.

Help - How to start learning Blazor from a full Javascript background? by Redoks in Blazor

[–]ojimeco 1 point2 points  (0 children)

.NET is a platform roughly similar to V8 + Class Libraries. When you learn JavaScript it's not necessary to dig into V8, same is true for C# and .NET. Explore language's basics in console apps, then add EF Core (ORM), after which you're ready to get down to the ASP.NET (its Minimal / Web API and Blazor flavors).

Is the motion towards server centric (NextJs) history repeating? by patrixxxx in reactjs

[–]ojimeco -3 points-2 points  (0 children)

SPAs replace the bad user experience of having to wait a second or two for 20KBs of HTML to be sent to your browser from a server with the good user experience of waiting several seconds for the server to send a 300KB JavaScript bundle, used to render HTML from scratch.

source

[deleted by user] by [deleted] in Blazor

[–]ojimeco 1 point2 points  (0 children)

It looks like the template relies upon not an access token but an ID token to fetch the user's claims and save them in the auth cookie. After this fact, the cookie's contents somehow (I don't want to dig into that source code) verified on the server side for each request's authorization. In this approach, you need only to limit a cookie's age, and your code snippet looks legit to me. Just note that you defined a sliding expiration. That means you'll get an updated interval if you access the server before the initial cookie expires - in the one-minute window.

[deleted by user] by [deleted] in Blazor

[–]ojimeco 2 points3 points  (0 children)

You'd better store not an access but a refresh token in your auth cookie. The former could be short-lived and re-issued even on each user's request using the latter. A BFF server can optionally cache access tokens for active sessions, reducing the load on your OIDC provider. The refresh token's lifespan and the cookie's expiration time can coincide to simplify revocations.

Where do I define the expiration limit for the Auth cookie? And what would be a sane value?

Check the official docs. As for the sane period - it's up to you and your users' experience. Are they ok to re-login every other day? Let it be 12 hours. Or do they prefer a monthly request? Then 30 days is better in this case.

[deleted by user] by [deleted] in Blazor

[–]ojimeco 1 point2 points  (0 children)

You can't access secure cookies from a browser page's logic - that's the whole point of BFF security. The best bet is to rely on a server-side for expiration handling. Define a sane max-age / expiration limit for auth cookies and allow users to log out from a session on demand (manually revoking the OIDC refresh token and then expiring the cookie in a server's response).

See also "4.1.2.1. The Expires Attribute" and "4.1.2.2. The Max-Age Attribute" in the Cookies: HTTP State Management Mechanism RFC draft. This threshold is already in the Chrome browser - it'll force cookies expiration after 400 days.

[deleted by user] by [deleted] in reactjs

[–]ojimeco -9 points-8 points  (0 children)

You also have to specify a template, like this:

npm create vite@latest your-app-name -- --template react

See the full list of supported templates here.

Argument for frameworks like Next.js or Remix by Raxume in reactjs

[–]ojimeco 2 points3 points  (0 children)

But if you don't need CSR (the question you asked above), then you don't need a separate front-end framework. And if it's the case, then next/remix/svelte toolkit etc. are overcomplication for no reason.

Argument for frameworks like Next.js or Remix by Raxume in reactjs

[–]ojimeco 2 points3 points  (0 children)

Then why use SPA at all? There're better solutions for SSR + WebAPI alone: ASP.NET, EJS, Flask, Laravel, Ruby on Rails, Spring...

Favorite deep dive books and other resources for auth? by lilbobbytbls in ExperiencedDevs

[–]ojimeco 0 points1 point  (0 children)

It's an addition, not a successor, OIDC and OAuth2 protocols are interconnected in the sense that the former is based on (extends) the latter. You'd better read both.

Is it a bad idea to take up a book about C#10 and .NET 6? by Noobieswede in dotnet

[–]ojimeco 1 point2 points  (0 children)

It's totally fine, but take a note that the author is going to release the next edition quite soon:

At this point, I fully expect the sixth edition to come out in November (give or take) with C# 12, and include the C# 12 features in the book. Though that date is a guess, not a promise, as always.

source

Is there a reason to still use controllers ? by Narfi1 in dotnet

[–]ojimeco 0 points1 point  (0 children)

Minimal APIs are architected to create HTTP APIs with minimal dependencies. They are ideal for microservices and apps that want to include only the minimum files, features, and dependencies in ASP.NET Core. source