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

remix-auth-email-link

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remix-auth-email-link - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

12

build/index.d.ts
import type { SessionStorage } from '@remix-run/server-runtime';
import type { AuthenticateOptions, StrategyVerifyCallback } from 'remix-auth';
import { Strategy } from 'remix-auth';
export declare type SendEmailOptions<User> = {
export type SendEmailOptions<User> = {
emailAddress: string;

@@ -11,3 +11,3 @@ magicLink: string;

};
export declare type SendEmailFunction<User> = {
export type SendEmailFunction<User> = {
(options: SendEmailOptions<User>): Promise<void>;

@@ -20,3 +20,3 @@ };

*/
export declare type VerifyEmailFunction = {
export type VerifyEmailFunction = {
(email: string): Promise<void>;

@@ -27,3 +27,3 @@ };

*/
export declare type MagicLinkPayload = {
export type MagicLinkPayload = {
/**

@@ -47,3 +47,3 @@ * Email address used to authenticate.

*/
export declare type EmailLinkStrategyOptions<User> = {
export type EmailLinkStrategyOptions<User> = {
/**

@@ -115,3 +115,3 @@ * The endpoint the user will go after clicking on the email link.

*/
export declare type EmailLinkStrategyVerifyParams = {
export type EmailLinkStrategyVerifyParams = {
email: string;

@@ -118,0 +118,0 @@ form: FormData;

@@ -37,2 +37,7 @@ "use strict";

const form = new URLSearchParams(await request.text());
const formData = new FormData();
// Convert the URLSearchParams to FormData
for (const [name, value] of form) {
formData.append(name, value);
}
// This should only be called in an action if it's used to start the login process

@@ -61,3 +66,3 @@ if (request.method === 'POST') {

const domainUrl = this.getDomainURL(request);
const magicLink = await this.sendToken(emailAddress, domainUrl, form);
const magicLink = await this.sendToken(emailAddress, domainUrl, formData);
session.set(this.sessionMagicLinkKey, await this.encrypt(magicLink));

@@ -64,0 +69,0 @@ session.set(this.sessionEmailKey, emailAddress);

{
"name": "remix-auth-email-link",
"version": "2.0.2",
"version": "2.1.0",
"main": "./build/index.js",

@@ -37,12 +37,13 @@ "types": "./build/index.d.ts",

"peerDependencies": {
"@remix-run/server-runtime": "^1.1.1",
"remix-auth": "^3.2.1"
"@remix-run/server-runtime": "^2.0.1",
"remix-auth": "^3.6.0"
},
"devDependencies": {
"@remix-run/node": "^1.1.1",
"@remix-run/react": "^1.1.1",
"@remix-run/server-runtime": "^1.1.1",
"@remix-run/node": "^2.0.1",
"@remix-run/react": "^2.0.1",
"@remix-run/server-runtime": "^2.0.1",
"@types/crypto-js": "^4.1.0",
"@typescript-eslint/eslint-plugin": "^5.8.1",
"@typescript-eslint/parser": "^5.8.1",
"core-js-pure": "^3.33.0",
"eslint": "^8.5.0",

@@ -53,9 +54,10 @@ "eslint-config-galex": "^3.5.3",

"prettier": "^2.5.1",
"react": "^17.0.2",
"remix-auth": "^3.2.1",
"react": "^18.0.2",
"remix-auth": "^3.6.0",
"ts-node": "^10.4.0",
"typescript": "^4.5.4"
"typescript": "^5.2.0"
},
"dependencies": {
"crypto-js": "^4.1.1"
"crypto-js": "^4.1.1",
"yarn": "^1.22.19"
},

@@ -62,0 +64,0 @@ "lint-staged": {

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