More Premium Hugo Themes Premium Nuxt Themes

Nuxt Auth Strapi Example

A Nuxt3 frontend codebase with Auth- & Sessions managed by '@sidebase/nuxt-auth' for Strapi v4.

Nuxt Auth Strapi Example

A Nuxt3 frontend codebase with Auth- & Sessions managed by '@sidebase/nuxt-auth' for Strapi v4.

Author Avatar Theme by justserdar
Github Stars Github Stars: 5
Last Commit Last Commit: Jan 20, 2024 -
First Commit Created: Dec 18, 2023 -
Nuxt Auth Strapi Example screenshot

Overview:

The Nuxt Auth Strapi Example is a project that demonstrates the use of the Nuxt3 authentication package called nuxt-auth, in combination with the Strapi server. This example project provides a template for implementing authentication in a Nuxt3 application using NextAuth.

Features:

  • Nuxt3 Authentication: The project utilizes the nuxt-auth package for authentication in a Nuxt3 application.
  • Strapi Integration: The example project is integrated with the Strapi server, allowing for seamless communication between the two.
  • Token Generation: A random string is used to generate authentication tokens, ensuring secure authentication for users.

Installation:

To install the Nuxt Auth Strapi Example, follow the steps below:

  1. Make sure to install the necessary dependencies.

  2. Set up the required environment variables, including:

    • NUXT_SECRET: A random string used for token generation.
    • ORIGIN: The URL of the authentication API (without trailing slash).
    • STRAPI_BASE_URL: The URL of the Strapi server (development or production).
    • CERTBOT_*: SSL certificate-related environment variables for production deployment.
      • CERTBOT_DOMAIN: The domain for which the certificate should be registered.
      • CERTBOT_EMAIL: The email under which the domain certificate will be registered.
  3. Create a .env file in the project root and fill it with the required environment variables.

Summary:

The Nuxt Auth Strapi Example project showcases how to integrate the nuxt-auth package with a Strapi server for authentication in a Nuxt3 application. By using the provided template and following the installation guide, developers can easily implement secure authentication functionality in their own Nuxt3 projects.