Complete Guide to React Auth Typescript

I have been trying to recreate the tutorial by @dan-auth0 in Typescript, and am having an issue where my routes remain exposed after wrapping them in the ProtectedRoute component. The code is essentially just a copy of the contents of the available github repository, but I am failing to achieve the protection which works in js.

Is there a functioning version of the same repo in Typescript? And would someone be able to take a peek at the code I am using to determine how I am missing to protect my routes?

Here is a link to the repo:

Please let me know if there are available repositories which I could use to base my development efforts on.


Hey there!

Can you share a link to the tutorial you’re talking about? Thank you!

Hey Konrad,

Here is a link to the tutorial which I mentioned. It is written in js, and I did what I could to convert the code to TypeScript, but am having the issue I mentioned (not with the js).


Howdy! I just found this issue while searching for questions related to React + TypeScript + Auth0.

You can consult these code samples if you still need assistance with setting up or troubleshooting your Auth0 TypeScript integration with React:

You can use them as starting points on how the integration could look like and help you troubleshoot any issues you may be facing.

I plan to create a React code sample that uses React Router v6 this week and next. :pray: