This is a Next.js project demonstrating how to set and unset Cookies using Server Actions.
This example can be applied when managing cookies in a Front.com sidebar plugin.
Install the dependencies, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
Next, open Front (app.frontapp.com or log in via your SSO provider), and head to Settings > Developers > Create App.
Create a new app with Sidebar Plugin feature, and add http://localhost:3000
as the plugin URL.
Now you can click back into your Front inbox, and select the plugin in your sidebar.
A demo version of this application is published at https://nextjs-front-plugin-with-cookie.vercel.app/
.
You are welcome to test this by creating a Front Sidebar Plugin app, and adding this as the Side panel URL.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Front Plugin guide - get started developing Front plugins.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out the Next.js deployment documentation for more details.