Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@particle-network/auth

Package Overview
Dependencies
Maintainers
3
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@particle-network/auth - npm Package Compare versions

Comparing version 0.4.11 to 0.4.13

10

lib/auth.js

@@ -28,2 +28,3 @@ "use strict";

this._authResult = null;
this.authTheme = "auto";
this.config = config;

@@ -247,2 +248,5 @@ window.addEventListener("message", (event) => {

}
setAuthTheme(authTheme) {
this.authTheme = authTheme;
}
on(event, listener) {

@@ -312,3 +316,7 @@ this.events.on(event, listener);

device_id: (0, utils_1.getDeviceId)(),
theme_type: window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light",
theme_type: this.authTheme === "auto"
? window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "light"
: this.authTheme,
};

@@ -315,0 +323,0 @@ Object.assign(params, Object.assign({}, extraParams));

5

lib/types.js

@@ -37,4 +37,5 @@ "use strict";

"phone",
"facebook",
"twitter",
"google",
"facebook",
"apple",

@@ -46,4 +47,2 @@ "discord",

"linkedin",
"twitter",
"telegram",
];

@@ -50,0 +49,0 @@ exports.supportChains = {

/// <reference types="node" />
import { EventEmitter } from "events";
import { Config, UserInfo, AuthType, Wallet, ChainInfo } from "./types";
import { Config, UserInfo, AuthType, Wallet, ChainInfo, AuthTheme } from "./types";
declare type PrefixedHexString = string;

@@ -12,2 +12,3 @@ declare type Base58String = string;

private _authResult;
private authTheme;
constructor(config: Config);

@@ -29,2 +30,3 @@ login(config?: {

wallet(chainType?: string): Wallet | null;
setAuthTheme(authTheme: AuthTheme): void;
on(event: string, listener: (...args: any[]) => void): void;

@@ -31,0 +33,0 @@ once(event: string, listener: (...args: any[]) => void): void;

@@ -34,3 +34,3 @@ export declare class AuthError {

}
export declare const AuthTypes: readonly ["email", "phone", "google", "facebook", "apple", "discord", "github", "twitch", "microsoft", "linkedin", "twitter", "telegram"];
export declare const AuthTypes: readonly ["email", "phone", "facebook", "twitter", "google", "apple", "discord", "github", "twitch", "microsoft", "linkedin"];
declare type AuthTypeTuple = typeof AuthTypes;

@@ -77,2 +77,3 @@ export declare type AuthType = AuthTypeTuple[number];

}
export declare type AuthTheme = "dark" | "light" | "auto";
export {};
{
"name": "@particle-network/auth",
"version": "0.4.11",
"version": "0.4.13",
"files": [

@@ -5,0 +5,0 @@ "lib",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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