Anyone know how to use NextAUTH with WordPress

[ad_1]

We have a NextJS ([T3 Stack]) website on the main domain.

We have a Monolithic WordPress + Woocommerce on a sub-domain.

NOTE: We are about to code the Headless version baked into our NextJS site but wanted to find out first how to deal with Authentication.

If a user logs into either site we want to have it be the same (ideally NextAuth) login as the NextJS (NextAuth) site.

Examples –

a) User registers or logs into Monolithic WordPress-Woocommerce on the checkout page and the login also logs the user into the nextJS site and data is shared on both the NEXTJS DB at Planetscale and the mySQL DB at Cloudways DO.

b) User signs up at the NextJS site and 2 days later they go to the WooCommerce store and on the checkout page login and make the sale. See example (a) for the db setup.

c) If users logs into NextJS nextAUTH site the users are simultaneously automatically logged into the WordPress Site.

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer