Socket
Socket
Sign inDemoInstall

remix-auth-discord

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remix-auth-discord - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

8

build/index.d.ts

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

/**
* These are all the available Discord locales
* @see https://discord.com/developers/docs/reference#locales
*/
declare type DiscordLocale = "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";
/**
* This represents a Discord Guild as returned by the API with the guilds scope enabled.

@@ -96,3 +101,3 @@ * @see https://discord.com/developers/docs/resources/user#get-current-user-guilds

*/
locale?: string;
locale?: DiscordLocale;
/**

@@ -123,2 +128,3 @@ * Whether the email on this account has been verified

}
export declare const DiscordStrategyDefaultName = "discord";
export declare class DiscordStrategy<User> extends OAuth2Strategy<User, DiscordProfile, DiscordExtraParams> {

@@ -125,0 +131,0 @@ name: string;

7

build/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DiscordStrategy = void 0;
exports.DiscordStrategy = exports.DiscordStrategyDefaultName = void 0;
const remix_auth_oauth2_1 = require("remix-auth-oauth2");
const discordApiBaseURL = "https://discord.com/api/v10";
exports.DiscordStrategyDefaultName = "discord";
class DiscordStrategy extends remix_auth_oauth2_1.OAuth2Strategy {

@@ -15,3 +16,3 @@ constructor({ clientID, clientSecret, callbackURL, scope, prompt, }, verify) {

}, verify);
this.name = "discord";
this.name = exports.DiscordStrategyDefaultName;
this.userInfoURL = `${discordApiBaseURL}/users/@me`;

@@ -37,3 +38,3 @@ this.scope = scope ? scope : ["identify", "email"];

const profile = {
provider: "discord",
provider: exports.DiscordStrategyDefaultName,
id: raw.id,

@@ -40,0 +41,0 @@ displayName: raw.username,

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

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc