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

auth-fast

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth-fast - npm Package Compare versions

Comparing version 0.0.5 to 1.0.0

12

CHANGELOG.md

@@ -0,1 +1,13 @@

# v1.0.0 (Mon Nov 18 2019)
#### 💥 Breaking Change
- feat: Rename authorize to verify and Type fixes (william@ordino.ai)
#### Authors: 1
- William Luke (william@ordino.ai)
---
# v0.0.5 (Mon Nov 18 2019)

@@ -2,0 +14,0 @@

9

dist/index.d.ts

@@ -10,3 +10,10 @@ interface LoginAuth {

}
export declare function authorize({ key, identifier, challengeId, secret, oth }: Auth): Promise<void>;
interface Data {
status: number;
success: Boolean;
fast_id: unknown;
challenge_ip: string;
challenge_ts: string;
}
export declare function verify({ key, identifier, challengeId, secret, oth }: Auth): Promise<Data>;
export declare function login({ identifier, key }: LoginAuth): Promise<void>;

@@ -13,0 +20,0 @@ interface AuthResult {

6

dist/index.js

@@ -11,3 +11,3 @@ "use strict";

const APP_SECRET = process.env.APP_SECRET;
async function authorize({ key, identifier, challengeId, secret, oth }) {
async function verify({ key, identifier, challengeId, secret, oth }) {
secret = typeof secret === 'undefined' ? APP_SECRET : secret;

@@ -18,5 +18,5 @@ const verify = url.directory("api/verify").query({ challengeId: challengeId, oth: oth, identifier: identifier, key: key, secret: secret });

const data = await response.json(); // parses JSON response into native JavaScript objects
console.log(data);
return data;
}
exports.authorize = authorize;
exports.verify = verify;
async function login({ identifier, key }) {

@@ -23,0 +23,0 @@ // Endpoint: https://api.fast.co/api/invite

{
"name": "auth-fast",
"version": "0.0.5",
"version": "1.0.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -1,1 +0,1 @@

# WIP
# WIP

@@ -22,7 +22,7 @@ require('es6-promise').polyfill();

success: Boolean,
fast_id: unknown,
fast_id: string | null,
challenge_ip: string,
challenge_ts: string,
}
export async function authorize({
export async function verify({
key,

@@ -40,3 +40,3 @@ identifier,

const data: Data = await response.json(); // parses JSON response into native JavaScript objects
console.log(data);
return data
}

@@ -46,7 +46,5 @@ export async function login({identifier, key}: LoginAuth){

const invite = url.directory("api/invite").query({ identifier: identifier, key: key});
console.log(invite.query())
console.log(invite.valueOf());
const response = await fetch(invite.valueOf());
const data: Data = await response.json(); // parses JSON response into native JavaScript objects
console.log(data);
return data
}

@@ -53,0 +51,0 @@

require('dotenv').config()
import { authorize, login, getParams } from '../src'
import { verify, login, getParams } from '../src'
const test_identifier = process.env.TEST_IDENTIFIER

@@ -18,5 +18,5 @@ const test_oth = process.env.TEST_OTH

async function test_authorize() {
async function test_verify() {
if(app_key && test_identifier && test_challengeid && test_oth){
await authorize({
await verify({
key: app_key,

@@ -23,0 +23,0 @@ identifier: test_identifier,

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