Skip to content

Commit

Permalink
fix tsup
Browse files Browse the repository at this point in the history
  • Loading branch information
felipap committed Feb 20, 2024
1 parent a302abf commit 8b03160
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
12 changes: 2 additions & 10 deletions handshake/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fiber-handshake",
"description": "Utility functions for acquiring OAuth credentials for popular APIs.",
"version": "0.0.1",
"version": "1.1.23",
"license": "MIT",
"sideEffects": false,
"main": "./dist/index.js",
Expand All @@ -13,6 +13,7 @@
"scripts": {
"build": "tsup",
"lint": "eslint src/",
"test": "echo todo",
"dev": "tsup --watch",
"check-types": "tsc --noEmit"
},
Expand All @@ -21,9 +22,7 @@
"react": "^18.2.0"
},
"devDependencies": {
"@types/cookie": "^0.6.0",
"@types/http-errors": "^2.0.4",
"@types/ms": "^0.7.31",
"@types/node": "18.11.9",
"@types/react": "^18.2.5",
"next": "13.5.4",
Expand All @@ -32,16 +31,9 @@
"typescript": "^5.1.6"
},
"dependencies": {
"@sindresorhus/slugify": "^2.2.1",
"clsx": "^1.2.1",
"cookie": "^0.6.0",
"http-errors": "^2.0.0",
"ms": "^2.1.3",
"nanoid": "^5.0.1",
"next-auth": "^4.24.6",
"oauth4webapi": "^2.10.3",
"openid-client": "^5.6.4",
"tailwind-merge": "^1.13.2",
"zod": "^3.22.4"
},
"homepage": "https://fiber.dev/handshake",
Expand Down
5 changes: 2 additions & 3 deletions handshake/src/providers/oauth/OAuthProvider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as oauth4 from "oauth4webapi";
import {
AuthorizationParameters,
CallbackParamsType,
Expand Down Expand Up @@ -84,14 +83,14 @@ export function OAuthProvider<Config extends TypicalOAuthConfig>(

// Generate a nonce if the provider requires it.
if (providerInfo.checks?.includes("nonce")) {
const value = oauth4.generateRandomNonce();
const value = generators.nonce();
params.nonce = value;
persist.nonce = value;
}

// Generate a state if the provider requires it.
if (providerInfo.checks?.includes("state")) {
const value = oauth4.generateRandomState();
const value = generators.state();
params.state = value;
persist.state = value;
}
Expand Down
4 changes: 2 additions & 2 deletions handshake/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export default defineConfig((options: Options) => ({
entry: ["src/**/*.ts"],
format: ["esm"],
dts: true,
sourcemap: true,
// minify: true,
minify: true,
// sourcemap: true,
external: ["react"],
...options,
}));

0 comments on commit 8b03160

Please sign in to comment.