nextjs-strapi-boilerplate icon indicating copy to clipboard operation
nextjs-strapi-boilerplate copied to clipboard

Update starter to Strapi V4

Open rubenbase opened this issue 2 years ago • 3 comments

As this starter is being featured in the new v4 examples from Strapi’s blog I think it would make sense to update it as it currently uses Strapi v3.

rubenbase avatar Feb 23 '22 00:02 rubenbase

Any plan for this?

byoungd avatar Mar 01 '22 01:03 byoungd

@rubenbase did you ever update this repo to v4?

Cally99 avatar Sep 17 '22 11:09 Cally99

A bit late here but for those having troubles using this starter with strapi v4 for me it simply has been about reinstalling the strapi part with latest version and then changing the url in nextjs-strapi-boilerplate/frontend/pages/api/auth/[...nextauth].ts

Change this

        const response = await fetch(
          `${process.env.NEXT_PUBLIC_API_URL}/auth/${account.provider}/callback?access_token=${account?.access_token}`
        );

to this:

        const response = await fetch(
          `${process.env.NEXT_PUBLIC_API_URL}/api/auth/${account.provider}/callback?access_token=${account?.access_token}`
        );

Leopold-V avatar Nov 26 '22 10:11 Leopold-V