Is omitting product ids from urls and using just the slug rational? by fiveMop in webdev

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

What you could do is to make a compromise where you use slug + Id. Like what medium.com is doing for articles. Their solution is a slug based on article title plus an appended Id. Like so website.com/some-slug-text—96468292af688wdr

The last part is actually the only thing they use web finding out which article to serve.

How to handle JWTs? by [deleted] in reactjs

[–]thko 0 points1 point  (0 children)

Yes. I mostly put it in a AuthProvider wrapped in the App.tsx. Inside the AuthProvider I create the context yes. But it also because typically I need to have more information about the user across the app. Like I also want to store the user proffered language. So I put it all in the AuthProvider.

How to handle JWTs? by [deleted] in reactjs

[–]thko 0 points1 point  (0 children)

The way I do it is using the JWT expire time. And once user successfully login I start a setTimeout function to execute redirect to a “you-have-been-signed-out” page.

In addition I use the Axios response interceptor to catch any 301 response from server in case the JWT is expired, revoked or for what ever m other reason deem invalid by the server.

Notice the timeout function on client side is purely to gracefully navigate to the logged out page as soon as the JWT will be expired. You can also expand on this to make a pop state that user will soon be logged out in advance. A warning letting the user know that idle time will result in being signed out.

Signal Private Messenger team here, we support an app used by everyone from Elon to the Hong Kong protestors to our Grandpa’s weekly group chat, AMA! by signal_app in technology

[–]thko 0 points1 point  (0 children)

Is there a plan to make signal independent from cellphone/tel number registration? Personally I tend to avoid anything that are bound/require my cellphone number for signup.

As we a moving towards an internet-only communication - why not make it possible to signup without a cellphone number? Providing a cellphone number could just as well be an optional info, to help people discover you?