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

@aptly-as/app-koa

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aptly-as/app-koa - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

11

dist/authorize.js
export async function authorize(ctx, next) {
const token = ctx.cookies.get(ctx.aptly.tokenCookie.name, { signed: true });
let organization = ctx.cookies.get(ctx.aptly.organizationCookie.name) ||
ctx.request.query.organization;
const queryOrganization = ctx.request.query.organization;
const cookieOrganization = ctx.cookies.get(ctx.aptly.organizationCookie.name);
let organization = cookieOrganization || queryOrganization;
if (!token && !organization) {

@@ -10,2 +11,8 @@ ctx.status = 401;

}
if (cookieOrganization &&
queryOrganization &&
cookieOrganization !== queryOrganization) {
ctx.cookies.set(ctx.aptly.organizationCookie.name, '');
return ctx.redirect(ctx.aptly.auth.getAuthorizeRedirect(String(queryOrganization), ctx.request.path));
}
try {

@@ -12,0 +19,0 @@ if (!token) {

2

package.json
{
"name": "@aptly-as/app-koa",
"version": "0.1.2",
"version": "0.1.3",
"description": "Template for NodeJS Typescript",

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is not supported yet

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