Sergio Xalambri's Avatar

Sergio Xalambri

@sergiodxa.com

Writing "React Router OAuth2 Handbook" Web Developer at Daffy.org Blogger at sergiodxa.com Open Source Author at GitHub.com/sergiodxa Sponsor me at https://github.com/sponsors/sergiodxa

739
Followers
195
Following
54
Posts
07.09.2023
Joined
Posts Following

Latest posts by Sergio Xalambri @sergiodxa.com

Video thumbnail

I was able to build a @remix.run v3 `lazy` function to lazy load components

The lazy loaded component retains the type of the props with an additional `fallback` prop to pass the JSX to render until it's loaded

Code: github.com/sergiodxa/re...

25.10.2025 06:12 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image Post image

Another @remix.run v3 example. This is how you can create custom components that allow the parent to listen to custom events.

Full code: github.com/sergiodxa/re...

22.10.2025 18:29 πŸ‘ 4 πŸ” 2 πŸ’¬ 0 πŸ“Œ 0
remix-v3-examples/app/state-libs/legend-state.tsx at main Β· sergiodxa/remix-v3-examples Contribute to sergiodxa/remix-v3-examples development by creating an account on GitHub.

The code is here if you figure know more about Legend State and can figure out how to do that

github.com/sergiodxa/re...

17.10.2025 05:49 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Here you have, I tried to use the `observe` function but I was not sure how to stop observing the observable once the component is unmounted (the signal does that), the observable onChange works perfectly for this

17.10.2025 05:48 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
a man in a suit and tie says " legen wait for it dary " while another man looks on ALT: a man in a suit and tie says " legen wait for it dary " while another man looks on

What is legend state?

17.10.2025 01:44 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Another @remix.run v3 + state management library example, now Stately.ai's xstate.

Define the machine once, create the actor and subscribe to updates in the setup scope, and get a snapshot or send events on the render scope.

Full code: github.com/sergiodxa/re...

16.10.2025 23:12 πŸ‘ 3 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0

Next on @remix.run v3 + state management libraries, I tried @preactjs.com Signals core package.

This requires to run the effect to subscribe to the signal inside this.queueTask, otherwise it tries to re-render before Remix did the first render.

Full code: github.com/sergiodxa/re...

16.10.2025 23:11 πŸ‘ 3 πŸ” 1 πŸ’¬ 0 πŸ“Œ 1
Post image

I'm trying different state management libraries, common in React, that have a JS only core and see how they integrate with @remix.run v3.

I started with Redux Toolkit. Super simple and straightforward to setup and use.

Code here: github.com/sergiodxa/re...

16.10.2025 23:10 πŸ‘ 4 πŸ” 1 πŸ’¬ 1 πŸ“Œ 1

In June we announced an open governance model for React Router.

Today, we are excited to welcome Sergio XalambrΓ­ and @rossipedia.com to the React Router Steering Committee!

Both have made valuable contributions to Remix and React Router over the years, and we appreciate their feedback.

26.08.2025 16:05 πŸ‘ 30 πŸ” 6 πŸ’¬ 3 πŸ“Œ 1
Preview
React Router OAuth2 Handbook Implement secure OAuth2 authentication in React Router and Remix apps with practical patterns.

The early bird for React Router OAuth2 Handbook is over, but there’s still a launch offer available.

🎁 The Complete Package has $50 off for the first 100 buyers.
🌍 PPP pricing is now active β€” for the book only.

go.sergiodxa.com/S4qaycD

14.05.2025 05:06 πŸ‘ 5 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
React Router OAuth2 Handbook Implement secure OAuth2 authentication in React Router and Remix apps with practical patterns.

Want to dive deeper into how tokens work in OAuth2 + OIDC?

Learn how to use them correctly in your Remix or React Router app.

πŸ“˜ Join the waitlist for theΒ React Router OAuth2 Handbook:
πŸ‘‰Β go.sergiodxa.com/x4HNprT

16.04.2025 02:29 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

πŸͺͺ The ID Token’s audience is the Client Application.

It contains user identity info and is meant to be consumed by the client, not by the API or auth server. That’s why itsΒ audΒ claim matches the client’s ID.

16.04.2025 02:29 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

πŸ”„ The Refresh Token’s audience is the Authorization Server.

It’s the only one allowed to accept it and issue a new Access Token. This keeps refresh logic centralized and secure, preventing misuse by clients or other services.

16.04.2025 02:29 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

πŸ”‘ The Access Token's audience is the Resource Server.

It’s the one that will validate and accept the token to give access to protected resources. This way, only the Resource Server can rely on itβ€”it’s not meant for the client or the auth server.

16.04.2025 02:29 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

In OAuth2 + OIDC, each token has a different audience:

πŸ”‘ Access Token β†’ Resource Server
πŸ”„ Refresh Token β†’ Authorization Server
πŸͺͺ ID Token β†’ Client App

Each audience ensures the token is used by the right party and for the right purpose.

16.04.2025 02:29 πŸ‘ 1 πŸ” 1 πŸ’¬ 1 πŸ“Œ 0
GitHub - sergiodxa/remix-auth-openauth: A Remix Auth strategy to use with an OpenAuth.js issuer A Remix Auth strategy to use with an OpenAuth.js issuer - sergiodxa/remix-auth-openauth

I published a Remix Auth strategy for the new @sst.dev's OpenAuth.js identity provider

github.com/sergiodxa/re...

12.12.2024 14:12 πŸ‘ 18 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0

ClientLoader doesn’t have access to context, this is a server only thing, rossipedia has been asking for an equivalent client version for a long time

Client side you can define it once in a separate file and just import it

08.12.2024 15:19 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I think @kentcdodds.com build it, he should have the code

06.12.2024 18:44 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

On the Remix server we have a bot that can create threads when you add a emoji to a message and automatically name the thread like "🧡 Thread for Dominik"

I use it a lot there to create them so I don’t think about the name

06.12.2024 13:00 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Most of that was already available before the standalone app, although the app is great, would be nice to have secure notes for things like API keys

23.11.2024 17:17 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Yes, you can create a group and share passwords there, you can have many groups too

23.11.2024 17:16 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Does this works with providers like GitHub, Google, Auth0, etc? From what I saw it seems it should since they use client id and client secrets?

23.11.2024 10:04 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I like the ideas it brings, specially ship less JS, but I'm not convinced the complexity is worth it, although I never tried it since I haven't used Next.js in years

I also don't like how it was approached, I always liked that React features were first tested at Meta with their scale, but not RSC

22.11.2024 00:54 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

So you can, without Vite 6, already use the actual wrangler instead of the proxy?

20.11.2024 03:18 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
GitHub - edgefirst-dev/starter-worker Contribute to edgefirst-dev/starter-worker development by creating an account on GitHub.

I have my own starter github.com/edgefirst-de..., alt ought it does more than just a base point

20.11.2024 02:39 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Cloudflare, previously Pages but now switching to Workers since it has all the nice things of Pages and more features

20.11.2024 00:27 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

How to properly build UIs, accessibility, feature proposals for JS

16.11.2024 06:43 πŸ‘ 6 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Same, I dropped CamelCase for file names after my first time someone renamed fileName to FileName and it started to cause issues on some systems but not others

12.11.2024 17:00 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

From that point, everything is an enhancement, scoped styles and interactivity with JS

10.11.2024 03:26 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I think starting with HTML-only would be a great way to make it declarative and work with progressive enhancement, in the absolute worst case you get an empty element, but if the template tag loaded (because it's in the document or imported) it will still render something

10.11.2024 03:26 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0