# Discord Login

> Discord login for EmDash, restricted to members of a Discord guild (role assignment and login records).

Source: https://emdashcmseverything.com/plugins/auth-discord/

- Category: Security
- Status: available
- Version: 0.1.4
- Price: Unknown
- Compatibility: EmDash >=1.1.0 <2
- License: MIT
- Maintainer: leCielEtoile
- Download: https://www.npmjs.com/package/emdash-auth-discord
- Repository: https://github.com/leCielEtoile/emdash-auth-discord
- Published: 2026-11-01

Discord login for EmDash, restricted to members of a Discord guild (role assignment and login records).

## Installation

Install the package from npm:

```bash
npm install emdash-auth-discord
```

Register the plugin in your Astro config:

```js
   import { defineConfig } from "astro/config"
   import emdash from "emdash/astro"
   import { discord } from "emdash-auth-discord"

   export default defineConfig({
     integrations: [
       emdash({
         authProviders: [
           discord({
             guildId: process.env.DISCORD_GUILD_ID,
             defaultRole: 10,
             siteTitle: "My Site",
             messages: { notGuildMember: "Only members of the My Site Discord server can log in." },
           }),
         ],
       }),
     ],
   })
```

## Details

- **Latest version:** 0.1.4
- **License:** MIT
- **Publisher:** leCielEtoile
- **Requires:** EmDash `>=1.1.0 <2`
- **Source repository:** [https://github.com/leCielEtoile/emdash-auth-discord](https://github.com/leCielEtoile/emdash-auth-discord)
- **npm package:** [emdash-auth-discord](https://www.npmjs.com/package/emdash-auth-discord)
