Modern Full-Stack Development with Nest.js, React, TypeScript, and MongoDB: Part 2

@yemiwebby my apologies, I was looking at the wrong project! (was looking at GitHub - yemiwebby/nest-react-project) -
Really appreciate your quick response. I think I’m unblocked now, will reach out with any questions.


Teamwork makes the dreamwork! We’re here for you @shishir.biyyala!

1 Like

Why do I have to log in to the application whenever I reload the page? @yemiwebby

Howdy, Nathan! Welcome to the Auth0 Community.

Are you using a social provider like Google to log in?

Thank you Dan!
Well… yes, when I click on “Sign in” buttom, the login authentication of Auth0 appear and I chose “Sign in with Google” option. So, I can can make the CRUD operations, but when I reload the page, I have to authenticate again to use the CRUD.

This may be happening when you are using the Developer Keys that Auth0 provides with social identity providers. Take a look at this document: Test Social Connections with Auth0 Developer Keys.

You can register your own keys and that can prevent that behavior. Something else you can try out is to enable the Auth0 Universal Login New Experience: New Universal Login Experience

Let us know if any of these options help you out. Thank you for trying out Auth0 as your identity solution :slight_smile:

Hi, thanks for the great article.
@yemiwebby I too am a junior developer (and learning Typescript) and I seem to have the same issue as @cookiewanwan. I ran the following commands per your suggestion
1- npm cache clean --force
2- Delete node_modules with package-lock.json
3- npm install

and now I get the following Typescript error in auth0-context.tsx:
"Cannot find name ‘Auth0ClientOptions’. TS2304

39 |        }
40 | 

41 | config: Auth0ClientOptions = {
| ^
42 | domain: ${process.env.REACT_APP_AUTH0_DOMAIN},
43 | client_id: ${process.env.REACT_APP_AUTH0_CLIENT_ID},
44 | redirect_uri: window.location.origin"

What am I doing wrong? I followed your blog article & also cloned from github and get the same error for each.

OS : Catalina 10.15.5
node : v13.9.0
npm : 6.13.7
nest : 6.14.2

1 Like

I fixed it! I simply forgot to import it. Thanks anyway :slight_smile:

1 Like

Hello, Fairouz. Welcome to the Auth0 community. I am glad that you got this resolved. Best of luck in your developer journey!

If you are interested in TypeScript, I also recommend you checking out these other tutorials:

Hi guys, can someone help me? iam getting a lot of objects is possibly ‘undefined’ on almost every hook like post, posts, and also iam getting an errors on let {postId} = useParams(); deconstructuring from useParams, thanks for help

Hi there!
Thank you for the amazing post!

I’m stuck in the problem which seems alike @fairouz.west .

export class Auth0Provider extends Component<{}, IState> {
constructor(props: any) {
    config: Auth0ClientOptions = {
        domain: `${process.env.REACT_APP_AUTH0_DOMAIN}`,
        client_id: `${process.env.REACT_APP_AUTH0_CLIENT_ID}`,
        redirect_uri: window.location.origin

Here I get an error;

Cannot find name ‘Auth0ClientOptions’.

Could you know anything to work it out?

I tried importing Auth0ClientOptions and used typeof because I thought we define “config” var which type is Auth0ClientOptions, but didn’t work ;(

I’m using
@auth0/auth0-spa-js": “^1.13.5”,
@types/auth0-js": “^9.14.2”,

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

If you face issues with newer versions, feel free to checkout this repo: GitHub - triemen/blog-frontend

1 Like

Hey I was updating the front-end too until I couldn’t solve/adapt aut0-context.tsx . I have seen your repo, there isn’t that file, in fact if I try to log in after update .env file I got an error GET403. Does everything work good to you? Thanks you

Right, now that you mention it, I also get a 403 error. It couldn’t access the user image because it wasn’t loaded. I uploaded a patch to the repo