@aura-stack/express 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +101 -0
- package/dist/_core/cookies.cjs +1 -0
- package/dist/_core/cookies.d.ts +1 -0
- package/dist/_core/cookies.js +1 -0
- package/dist/_core/crypto.cjs +1 -0
- package/dist/_core/crypto.d.ts +1 -0
- package/dist/_core/crypto.js +1 -0
- package/dist/_core/identity.cjs +1 -0
- package/dist/_core/identity.d.ts +1 -0
- package/dist/_core/identity.js +1 -0
- package/dist/_core/shared.cjs +1 -0
- package/dist/_core/shared.d.ts +1 -0
- package/dist/_core/shared.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +1 -0
- package/dist/oauth/atlassian.cjs +1 -0
- package/dist/oauth/atlassian.d.ts +1 -0
- package/dist/oauth/atlassian.js +1 -0
- package/dist/oauth/bitbucket.cjs +1 -0
- package/dist/oauth/bitbucket.d.ts +1 -0
- package/dist/oauth/bitbucket.js +1 -0
- package/dist/oauth/click-up.cjs +1 -0
- package/dist/oauth/click-up.d.ts +1 -0
- package/dist/oauth/click-up.js +1 -0
- package/dist/oauth/discord.cjs +1 -0
- package/dist/oauth/discord.d.ts +1 -0
- package/dist/oauth/discord.js +1 -0
- package/dist/oauth/dribbble.cjs +1 -0
- package/dist/oauth/dribbble.d.ts +1 -0
- package/dist/oauth/dribbble.js +1 -0
- package/dist/oauth/dropbox.cjs +1 -0
- package/dist/oauth/dropbox.d.ts +1 -0
- package/dist/oauth/dropbox.js +1 -0
- package/dist/oauth/figma.cjs +1 -0
- package/dist/oauth/figma.d.ts +1 -0
- package/dist/oauth/figma.js +1 -0
- package/dist/oauth/github.cjs +1 -0
- package/dist/oauth/github.d.ts +1 -0
- package/dist/oauth/github.js +1 -0
- package/dist/oauth/gitlab.cjs +1 -0
- package/dist/oauth/gitlab.d.ts +1 -0
- package/dist/oauth/gitlab.js +1 -0
- package/dist/oauth/index.cjs +1 -0
- package/dist/oauth/index.d.ts +1 -0
- package/dist/oauth/index.js +1 -0
- package/dist/oauth/mailchimp.cjs +1 -0
- package/dist/oauth/mailchimp.d.ts +1 -0
- package/dist/oauth/mailchimp.js +1 -0
- package/dist/oauth/notion.cjs +1 -0
- package/dist/oauth/notion.d.ts +1 -0
- package/dist/oauth/notion.js +1 -0
- package/dist/oauth/pinterest.cjs +1 -0
- package/dist/oauth/pinterest.d.ts +1 -0
- package/dist/oauth/pinterest.js +1 -0
- package/dist/oauth/spotify.cjs +1 -0
- package/dist/oauth/spotify.d.ts +1 -0
- package/dist/oauth/spotify.js +1 -0
- package/dist/oauth/strava.cjs +1 -0
- package/dist/oauth/strava.d.ts +1 -0
- package/dist/oauth/strava.js +1 -0
- package/dist/oauth/twitch.cjs +1 -0
- package/dist/oauth/twitch.d.ts +1 -0
- package/dist/oauth/twitch.js +1 -0
- package/dist/oauth/x.cjs +1 -0
- package/dist/oauth/x.d.ts +1 -0
- package/dist/oauth/x.js +1 -0
- package/package.json +110 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Auth Stack Js
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<h1><b>@aura-stack/express</b></h1>
|
|
4
|
+
|
|
5
|
+
**Type-safe Express middleware and utilities for the Aura Stack authentication library**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@aura-stack/express)
|
|
8
|
+
[](https://jsr.io/@aura-stack/express)
|
|
9
|
+
[](https://opensource.org/licenses/MIT)
|
|
10
|
+
|
|
11
|
+
[Official Docs](https://aura-stack-auth.vercel.app/docs) · [Express Package Docs](https://aura-stack-auth.vercel.app/docs/packages/express)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`@aura-stack/express` provides a seamless integration layer for **Express** applications using **Aura Auth**. It encapsulates the core authentication logic into standard Express middlewares, ensuring that your session state is correctly typed and accessible throughout your application's middleware chain.
|
|
18
|
+
|
|
19
|
+
By leveraging TypeScript's global augmentation and middleware inference, it provides a "zero-effort" typed experience for your protected routes.
|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
- **Standard Middleware** — Use `withAuth` as a standard middleware in your route definitions.
|
|
24
|
+
- **Deep Type Inference** — Automatically infers your custom `User` and `Session` shapes from the initial configuration.
|
|
25
|
+
- **Global Augmentation** — Adds first-class support for `res.locals.session` directly to Express types.
|
|
26
|
+
- **Framework-Agnostic Core** — Bridge Web Request/Response API handlers to Express without sacrificing performance.
|
|
27
|
+
- **Typed Propagation** — Middleware correctly propagates types to subsequent handlers in the route chain.
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pnpm add @aura-stack/express
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
### 1. Configure Auth
|
|
38
|
+
|
|
39
|
+
Create your authentication instance. This typically goes in a shared file like `lib/auth.ts`.
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import { createAuth } from "@aura-stack/express"
|
|
43
|
+
|
|
44
|
+
export const auth = createAuth({
|
|
45
|
+
oauth: ["github"],
|
|
46
|
+
session: {
|
|
47
|
+
strategy: "jwt",
|
|
48
|
+
maxAge: 30 * 24 * 60 * 60, // 30 days
|
|
49
|
+
},
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
export const { toHandler, withAuth } = auth
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 2. Mount Auth Endpoints
|
|
56
|
+
|
|
57
|
+
Mount the authentication endpoints on your desired base path (default: `/api/auth`).
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
import express from "express"
|
|
61
|
+
import { toHandler } from "./lib/auth"
|
|
62
|
+
|
|
63
|
+
const app = express()
|
|
64
|
+
|
|
65
|
+
// All Aura Auth routes (sign-in, sign-out, session, etc.)
|
|
66
|
+
app.all("/api/auth/*", toHandler)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 3. Protect Your Routes
|
|
70
|
+
|
|
71
|
+
Use the `withAuth` middleware to protect routes. The session will be automatically available and **fully typed** in `res.locals.session`.
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
import { withAuth } from "./lib/auth"
|
|
75
|
+
|
|
76
|
+
app.get("/api/protected", withAuth, (req, res) => {
|
|
77
|
+
// session is automatically available and typed!
|
|
78
|
+
const session = res.locals.session
|
|
79
|
+
|
|
80
|
+
if (!session) {
|
|
81
|
+
return res.status(401).json({ error: "Unauthorized" })
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// TypeScript knows about session.user.name, email, etc.
|
|
85
|
+
res.json({ message: `Hello, ${session.user.name}!` })
|
|
86
|
+
})
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Documentation
|
|
90
|
+
|
|
91
|
+
Visit the [**official documentation website**](https://aura-stack-auth.vercel.app) for more detailed guides and API references.
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
Licensed under the [MIT License](../../LICENSE). © [Aura Stack](https://github.com/aura-stack-ts)
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
<p align="center">
|
|
100
|
+
Made with ❤️ by <a href="https://github.com/aura-stack-ts">Aura Stack team</a>
|
|
101
|
+
</p>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/cookies`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/cookies";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/cookies";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/crypto`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/crypto";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/crypto";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/identity`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/identity";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/identity";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/shared`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/shared";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/shared";
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@aura-stack/auth`);const t=e=>e.split(/,(?=\s*[^;,\s]+=)/g).map(e=>e.trim()).filter(Boolean),n=e=>{let t=e.method??`GET`,n=`${e.protocol??`http`}://${e.get(`host`)??`localhost`}`,r=new URL(e.originalUrl??e.url,n),i=new Headers;for(let[t,n]of Object.entries(e.headers))if(Array.isArray(n))for(let e of n)i.append(t,e);else n!==void 0&&i.set(t,n);let a=t!==`GET`&&t!==`HEAD`?JSON.stringify(e.body):void 0;return a!==void 0&&i.set(`content-type`,`application/json`),new globalThis.Request(r,{method:t,headers:i,body:a})},r=async(e,n)=>{for(let[r,i]of e.headers.entries())if(r.toLowerCase()===`set-cookie`){let r=e.headers.getSetCookie?.()??t(i);for(let e of r)n.append(`Set-Cookie`,e)}else n.setHeader(r,i);if(n.status(e.status),e.status>=300&&e.status<400){let t=e.headers.get(`location`)??`/`;return n.json({message:`Redirecting`,location:t})}if(e.headers.get(`content-type`)?.includes(`application/json`)){let t=await e.json();return n.json(t)}let r=await e.text();return n.send(r)},i=async(e,t,i)=>r(await e.ALL(n(t)),i),a=({api:e})=>async(t,r,i)=>{try{let a=n(t),{session:o,headers:s}=await e.getSession({headers:a.headers});for(let[e,t]of s.entries())e.toLowerCase()===`set-cookie`?r.append(e,t):r.setHeader(e,t);return r.locals.session=o,i()}catch(e){return i(e)}},o=t=>{let n=(0,e.createAuth)(t);return{...n,toHandler:(e,t)=>i(n.handlers,e,t),withAuth:a(n)}};exports.createAuth=o,exports.toExpressResponse=r,exports.toWebRequest=n;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AuthConfig as AuthConfig$1, AuthInstance as AuthInstance$1, Session as Session$1, User as User$1 } from "@aura-stack/auth";
|
|
2
|
+
import { FromShapeToObject, Identities } from "@aura-stack/auth/identity";
|
|
3
|
+
import { Request, RequestHandler, Response } from "express";
|
|
4
|
+
import { AuthConfig, AuthInstance, Session, User } from "@aura-stack/auth/types";
|
|
5
|
+
|
|
6
|
+
//#region src/lib/with-auth.d.ts
|
|
7
|
+
type LocalsWithSession<DefaultUser extends User$1 = User$1> = {
|
|
8
|
+
session?: Session$1<DefaultUser> | null;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/@types/index.d.ts
|
|
12
|
+
/**
|
|
13
|
+
* The ExpressInstance type represents the shape of the object returned by the `createAuth`
|
|
14
|
+
* function in the Express integration of Aura Auth. It was implemented due to errors related
|
|
15
|
+
* to unportable types from the `createAuth` function.
|
|
16
|
+
*/
|
|
17
|
+
type ExpressInstance<Identity extends Identities = Identities> = AuthInstance$1<FromShapeToObject<Identity>> & {
|
|
18
|
+
toHandler: (req: Request, res: Response) => Promise<Response>;
|
|
19
|
+
withAuth: RequestHandler<any, any, any, any, LocalsWithSession<FromShapeToObject<Identity>>>;
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/createAuth.d.ts
|
|
23
|
+
declare const createAuth: <Identity extends Identities>(config: AuthConfig$1<Identity>) => ExpressInstance<Identity>;
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/lib/handler.d.ts
|
|
26
|
+
/**
|
|
27
|
+
* Convert an Express Request to a Web API Request so it can be handled
|
|
28
|
+
* by the framework-agnostic Aura Auth handlers.
|
|
29
|
+
*/
|
|
30
|
+
declare const toWebRequest: (req: Request) => globalThis.Request;
|
|
31
|
+
/**
|
|
32
|
+
* Forward the Web API Response back to the Express Response.
|
|
33
|
+
* Handles redirects, multiple Set-Cookie headers, and JSON/text bodies.
|
|
34
|
+
*/
|
|
35
|
+
declare const toExpressResponse: (webResponse: globalThis.Response, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { type AuthConfig, type AuthInstance, type Session, type User, createAuth, toExpressResponse, toWebRequest };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createAuth as e}from"@aura-stack/auth";const t=e=>e.split(/,(?=\s*[^;,\s]+=)/g).map(e=>e.trim()).filter(Boolean),n=e=>{let t=e.method??`GET`,n=`${e.protocol??`http`}://${e.get(`host`)??`localhost`}`,r=new URL(e.originalUrl??e.url,n),i=new Headers;for(let[t,n]of Object.entries(e.headers))if(Array.isArray(n))for(let e of n)i.append(t,e);else n!==void 0&&i.set(t,n);let a=t!==`GET`&&t!==`HEAD`?JSON.stringify(e.body):void 0;return a!==void 0&&i.set(`content-type`,`application/json`),new globalThis.Request(r,{method:t,headers:i,body:a})},r=async(e,n)=>{for(let[r,i]of e.headers.entries())if(r.toLowerCase()===`set-cookie`){let r=e.headers.getSetCookie?.()??t(i);for(let e of r)n.append(`Set-Cookie`,e)}else n.setHeader(r,i);if(n.status(e.status),e.status>=300&&e.status<400){let t=e.headers.get(`location`)??`/`;return n.json({message:`Redirecting`,location:t})}if(e.headers.get(`content-type`)?.includes(`application/json`)){let t=await e.json();return n.json(t)}let r=await e.text();return n.send(r)},i=async(e,t,i)=>r(await e.ALL(n(t)),i),a=({api:e})=>async(t,r,i)=>{try{let a=n(t),{session:o,headers:s}=await e.getSession({headers:a.headers});for(let[e,t]of s.entries())e.toLowerCase()===`set-cookie`?r.append(e,t):r.setHeader(e,t);return r.locals.session=o,i()}catch(e){return i(e)}},o=t=>{let n=e(t);return{...n,toHandler:(e,t)=>i(n.handlers,e,t),withAuth:a(n)}};export{o as createAuth,r as toExpressResponse,n as toWebRequest};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/atlassian`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/atlassian";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/atlassian";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/bitbucket`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/bitbucket";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/bitbucket";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/click-up`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/click-up";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/click-up";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/discord`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/discord";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/discord";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/dribbble`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/dribbble";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/dribbble";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/dropbox`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/dropbox";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/dropbox";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/figma`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/figma";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/figma";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/github`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/github";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/github";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/gitlab`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/gitlab";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/gitlab";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/index`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/index";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/index";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/mailchimp`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/mailchimp";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/mailchimp";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/notion`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/notion";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/notion";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/pinterest`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/pinterest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/pinterest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/spotify`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/spotify";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/spotify";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/strava`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/strava";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/strava";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/twitch`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/twitch";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/twitch";
|
package/dist/oauth/x.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require(`@aura-stack/auth/oauth/x`);Object.keys(e).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aura-stack/auth/oauth/x";
|
package/dist/oauth/x.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@aura-stack/auth/oauth/x";
|
package/package.json
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aura-stack/express",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Authentication integration for Express applications. Provides middleware, route handlers and session verification powered by Aura Auth.",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/aura-stack-ts/auth"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"require": "./dist/index.cjs"
|
|
20
|
+
},
|
|
21
|
+
"./oauth": {
|
|
22
|
+
"types": "./dist/oauth/index.d.ts",
|
|
23
|
+
"import": "./dist/oauth/index.js",
|
|
24
|
+
"require": "./dist/oauth/index.cjs"
|
|
25
|
+
},
|
|
26
|
+
"./oauth/*": {
|
|
27
|
+
"types": "./dist/oauth/*.d.ts",
|
|
28
|
+
"import": "./dist/oauth/*.js",
|
|
29
|
+
"require": "./dist/oauth/*.cjs"
|
|
30
|
+
},
|
|
31
|
+
"./identity": {
|
|
32
|
+
"types": "./dist/_core/identity.d.ts",
|
|
33
|
+
"import": "./dist/_core/identity.js",
|
|
34
|
+
"require": "./dist/_core/identity.cjs"
|
|
35
|
+
},
|
|
36
|
+
"./crypto": {
|
|
37
|
+
"types": "./dist/_core/crypto.d.ts",
|
|
38
|
+
"import": "./dist/_core/crypto.js",
|
|
39
|
+
"require": "./dist/_core/crypto.cjs"
|
|
40
|
+
},
|
|
41
|
+
"./shared": {
|
|
42
|
+
"types": "./dist/_core/shared.d.ts",
|
|
43
|
+
"import": "./dist/_core/shared.js",
|
|
44
|
+
"require": "./dist/_core/shared.cjs"
|
|
45
|
+
},
|
|
46
|
+
"./cookies": {
|
|
47
|
+
"types": "./dist/_core/cookies.d.ts",
|
|
48
|
+
"import": "./dist/_core/cookies.js",
|
|
49
|
+
"require": "./dist/_core/cookies.cjs"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"keywords": [
|
|
53
|
+
"auth",
|
|
54
|
+
"oauth",
|
|
55
|
+
"oauth2",
|
|
56
|
+
"security",
|
|
57
|
+
"session",
|
|
58
|
+
"authentication",
|
|
59
|
+
"authorization",
|
|
60
|
+
"express",
|
|
61
|
+
"expressjs",
|
|
62
|
+
"node",
|
|
63
|
+
"bun",
|
|
64
|
+
"deno",
|
|
65
|
+
"middleware",
|
|
66
|
+
"typescript",
|
|
67
|
+
"javascript",
|
|
68
|
+
"web-api",
|
|
69
|
+
"aura-stack",
|
|
70
|
+
"aura-stack-ts",
|
|
71
|
+
"aura auth",
|
|
72
|
+
"aura-auth"
|
|
73
|
+
],
|
|
74
|
+
"author": "Aura Stack <aurastackjs@gmail.com> | Hernan Alvarado <halvaradop.dev@gmail.com>",
|
|
75
|
+
"homepage": "https://aura-stack-auth.vercel.app",
|
|
76
|
+
"bugs": {
|
|
77
|
+
"url": "https://github.com/aura-stack-ts/auth/issues"
|
|
78
|
+
},
|
|
79
|
+
"license": "MIT",
|
|
80
|
+
"dependencies": {
|
|
81
|
+
"@aura-stack/auth": "0.7.1"
|
|
82
|
+
},
|
|
83
|
+
"devDependencies": {
|
|
84
|
+
"@types/supertest": "^6.0.3",
|
|
85
|
+
"supertest": "^7.2.2",
|
|
86
|
+
"express": "^4.18.2",
|
|
87
|
+
"@types/express": "^4.17.17",
|
|
88
|
+
"vitest": "4.1.4",
|
|
89
|
+
"@aura-stack/tsdown-config": "0.0.0",
|
|
90
|
+
"@aura-stack/tsconfig": "0.0.0"
|
|
91
|
+
},
|
|
92
|
+
"peerDependencies": {
|
|
93
|
+
"express": ">=4.0.0"
|
|
94
|
+
},
|
|
95
|
+
"scripts": {
|
|
96
|
+
"dev": "tsdown --watch",
|
|
97
|
+
"build": "pnpm sync:modules && tsdown",
|
|
98
|
+
"lint": "oxlint",
|
|
99
|
+
"lint:fix": "oxlint --fix",
|
|
100
|
+
"test": "vitest --run",
|
|
101
|
+
"test:watch": "vitest",
|
|
102
|
+
"test:coverage": "vitest --run --coverage",
|
|
103
|
+
"format": "oxfmt",
|
|
104
|
+
"format:check": "oxfmt --check",
|
|
105
|
+
"type-check": "tsc --noEmit",
|
|
106
|
+
"clean": "rm -rf dist src/_core src/oauth",
|
|
107
|
+
"clean:cts": "[ -d dist ] && find dist -type f -name \"*.cts\" -delete || true",
|
|
108
|
+
"sync:modules": "node ../shared/scripts/modules.js"
|
|
109
|
+
}
|
|
110
|
+
}
|