Skip to content

SebbeJohansson/Nuxt3-Discord-Auth-Example

Repository files navigation

Nuxt 3 Discord Authentication Example

Uses https://github.com/nuxt-alt/auth to support nuxt3 properly. Instructions for discord: https://auth.nuxtjs.org/providers/discord/

Steps:

  1. Clone project.
  2. Create an application in https://discord.com/developers/applications.
  3. Copy client id and client secret from oauth2 settings - https://discord.com/developers/applications/{{yourclientid}}/oauth2/general
  4. Add client id and client secret to nuxt.config.ts.
  5. Add redirect uri as "http://localhost:3000/auth/callback" for development. image
  6. Run yarn install.
  7. Run yarn run dev.
  8. Go to http://localhost:3000/auth/login to login.

This repository is bare-boned on purpose. Please open an issue if something is unclear or if something should be added.

Nuxt3 Setup

Look at the Nuxt 3 documentation to learn more.

Make sure to install the dependencies:

# yarn
yarn install

# npm
npm install

# pnpm
pnpm install

Development Server

Start the development server on http://localhost:3000

npm run dev

Production

Build the application for production:

npm run build

Locally preview production build:

npm run preview

Check out the deployment documentation for more information.

About

An example project for nuxt3 discord authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published