Epic Next.js 14 Tutorial: Learn Next JS by building a real-life project: Part 1

Hello, you wonderful people; in this post of many, I would like to introduce you to what we will be building.


This is a companion discussion topic for the original entry at https://strapi.io/blog/epic-next-js-14-tutorial-learn-next-js-by-building-a-real-life-project-part-1-2
1 Like

Hi,
Thank you for this tutorial. I just want to know how many posts will be shared and when the last one will be published.

There will be about 10 - 15 posts. I am going to try to ramp up the release to two post per week starting next week. There is a lot of topics to cover.

If someone is getting this error TypeError: fetch failed, just change baseUrl from localhost to 127.0.0.1, like this const baseUrl = "http://127.0.0.1:1337";

1 Like

Thank you for sharing.

Strapi is awesome there is no doubt, however NextJS is a full-stack framework and with NextAuth I can take care of authentication built into NextJS. It would be good to have a Strapi layer within NextJS, so I can build custom queries and extend Strapi backend queries directly within NextJS.

1 Like

Thank you for your feedback. I wanted to focus on on keeping the scope of the project small. Yes, using NextAuth is an option. And it may be something we can cover in the future. I wanted to show basic auth implementation without using a library.

I know some folks like to you different Auth provides, like Clrek and many others. So wanted to keep this part open for folks to chose later if they want to implement other auth libraries.

But great point. And for any one interested, checkout the docs here to learn more about NextAuth

Also here is another great resource an authentication in general.

1 Like

Thank you for an awesome wonderful article!

Now I’m exploring Next Auth’s capabilities and found out that its capabilities end at user authentication and you have to write authorization yourself to interact with the server.

In one of the articles it was suggested to deploy a server on NestJS, connect passportjs to it, release your own access token

Maybe I’m wrong, but now I think it’s better to use the server capabilities (in our case strapi) for authentication and authorization.

I would say it all depends on the requirements of your project. If your users will be interacting with Strapi’s api, I don’t see the need to overcomplicate things and just use Strapi authentication flow.

But what you mentioned about using your own provider and using API token to communicate with Strapi is also a common option.

1 Like