Socket
Socket
Sign inDemoInstall

remix-auth-discord

Package Overview
Dependencies
22
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.2 to 1.3.3

4

build/index.d.ts

@@ -7,3 +7,3 @@ import type { StrategyVerifyCallback } from "remix-auth";

*/
export type DiscordScope = "activities.read" | "activities.write" | "applications.builds.read" | "applications.builds.upload" | "applications.commands" | "applications.commands.update" | "applications.entitlements" | "applications.store.update" | "bot" | "connections" | "dm_channels.read" | "email" | "gdm.join" | "guilds" | "guilds.join" | "guilds.members.read" | "identify" | "messages.read" | "relationships.read" | "role_connections.write" | "rpc" | "rpc.activities.write" | "rpc.notifications.read" | "rpc.voice.read" | "rpc.voice.write" | "voice" | "webhook.incoming";
export type DiscordScope = "activities.read" | "activities.write" | "applications.builds.read" | "applications.builds.upload" | "applications.commands" | "applications.commands.update" | "applications.commands.permissions.update" | "applications.entitlements" | "applications.store.update" | "bot" | "connections" | "dm_channels.read" | "email" | "gdm.join" | "guilds" | "guilds.join" | "guilds.members.read" | "identify" | "messages.read" | "relationships.read" | "role_connections.write" | "rpc" | "rpc.activities.write" | "rpc.notifications.read" | "rpc.voice.read" | "rpc.voice.write" | "voice" | "webhook.incoming";
/**

@@ -18,3 +18,3 @@ * These are all the available Guild Features

*/
type DiscordLocale = "id" | "da" | "de" | "en-GB" | "en-US" | "es-ES" | "fr" | "hr" | "it" | "lt" | "hu" | "nl" | "no" | "pl" | "pt-BR" | "ro" | "fi" | "sv-SE" | "vi" | "tr" | "cs" | "el" | "bg" | "ru" | "uk" | "hi" | "th" | "zh-CN" | "ja" | "zh-TW" | "ko";
type DiscordLocale = "id" | "da" | "de" | "en-GB" | "en-US" | "es-ES" | "es-419" | "fr" | "hr" | "it" | "lt" | "hu" | "nl" | "no" | "pl" | "pt-BR" | "ro" | "fi" | "sv-SE" | "vi" | "tr" | "cs" | "el" | "bg" | "ru" | "uk" | "hi" | "th" | "zh-CN" | "ja" | "zh-TW" | "ko";
/**

@@ -21,0 +21,0 @@ * This represents a Discord Guild as returned by the API with the guilds scope enabled.

{
"name": "remix-auth-discord",
"version": "1.3.2",
"version": "1.3.3",
"main": "./build/index.js",

@@ -5,0 +5,0 @@ "types": "./build/index.d.ts",

@@ -42,2 +42,9 @@ # DiscordStrategy

/**
* In this example we will remove the features of the guilds the user is in,
* so we have to create our own (slightly changed) type for the guilds.
* You might need to edit this in your use case.
*/
type CustomDiscordGuild = Omit<PartialDiscordGuild, "features">;
export interface DiscordUser {

@@ -48,3 +55,4 @@ id: DiscordProfile["id"];

email: DiscordProfile["__json"]["email"];
guilds?: Array<PartialDiscordGuild>;
locale?: string;
guilds?: Array<CustomDiscordGuild>;
accessToken: string;

@@ -89,5 +97,6 @@ refreshToken: string;

* In this example we're only interested in guilds where the user is either the owner or has the `MANAGE_GUILD` permission (This check includes the `ADMINISTRATOR` permission)
* And not interested in the Guild Features
* And not interested in the Guild Features.
* That's why we use the earlier created CustomDiscordGuild type now.
*/
const guilds: Array<PartialDiscordGuild> = userGuilds
const guilds: Array<CustomDiscordGuild> = userGuilds
.filter(

@@ -94,0 +103,0 @@ (g) =>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc