express-authenticators
Advanced tools
Comparing version 1.0.0-pre-1 to 1.0.0-pre-2
@@ -20,3 +20,3 @@ export declare class OAuthError extends Error { | ||
} | ||
export declare const getConsentUrl: ({ addNonce, consentUrl, clientIDQueryName, clientID, redirectUri, scope, responseType, enablePKCE, additionalParams, }: { | ||
export declare const getConsentUrl: ({ addNonce, consentUrl, clientIDQueryName, clientID, redirectUri, scope, responseType, enablePKCE, additionalParams, state, }: { | ||
clientID: string; | ||
@@ -31,2 +31,3 @@ redirectUri: string; | ||
addNonce?: boolean | undefined; | ||
state?: string | undefined; | ||
}) => Promise<{ | ||
@@ -36,3 +37,3 @@ url: string; | ||
nonce?: `${string}-${string}-${string}-${string}-${string}` | undefined; | ||
state: `${string}-${string}-${string}-${string}-${string}`; | ||
state: string; | ||
verifier: string; | ||
@@ -39,0 +40,0 @@ }; |
@@ -46,4 +46,4 @@ "use strict"; | ||
exports.OAuthError = OAuthError; | ||
const getConsentUrl = ({ addNonce = false, consentUrl, clientIDQueryName = 'client_id', clientID, redirectUri, scope, responseType = 'code', enablePKCE, additionalParams, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
const state = (0, crypto_1.randomUUID)(); | ||
const getConsentUrl = ({ addNonce = false, consentUrl, clientIDQueryName = 'client_id', clientID, redirectUri, scope, responseType = 'code', enablePKCE, additionalParams, state, }) => __awaiter(void 0, void 0, void 0, function* () { | ||
state !== null && state !== void 0 ? state : (state = (0, crypto_1.randomUUID)()); | ||
// https://datatracker.ietf.org/doc/html/rfc7636#section-4.1 | ||
@@ -50,0 +50,0 @@ // rfc7636 requires key length between 43-128 |
@@ -15,3 +15,3 @@ export interface IAppleEnv { | ||
nonce?: `${string}-${string}-${string}-${string}-${string}` | undefined; | ||
state: `${string}-${string}-${string}-${string}-${string}`; | ||
state: string; | ||
verifier: string; | ||
@@ -18,0 +18,0 @@ }; |
@@ -12,3 +12,3 @@ import { OAuthCallbackQuery, OAuthState } from '../lib/oauth'; | ||
nonce?: `${string}-${string}-${string}-${string}-${string}` | undefined; | ||
state: `${string}-${string}-${string}-${string}-${string}`; | ||
state: string; | ||
verifier: string; | ||
@@ -15,0 +15,0 @@ }; |
@@ -11,3 +11,3 @@ import { OAuthCallbackQuery, OAuthState } from '../lib/oauth'; | ||
nonce?: `${string}-${string}-${string}-${string}-${string}` | undefined; | ||
state: `${string}-${string}-${string}-${string}-${string}`; | ||
state: string; | ||
verifier: string; | ||
@@ -14,0 +14,0 @@ }; |
@@ -11,3 +11,3 @@ import { OAuthCallbackQuery, OAuthState } from '../lib/oauth'; | ||
nonce?: `${string}-${string}-${string}-${string}-${string}` | undefined; | ||
state: `${string}-${string}-${string}-${string}-${string}`; | ||
state: string; | ||
verifier: string; | ||
@@ -14,0 +14,0 @@ }; |
@@ -12,3 +12,3 @@ import { OAuthCallbackQuery, OAuthState } from '../lib/oauth'; | ||
nonce?: `${string}-${string}-${string}-${string}-${string}` | undefined; | ||
state: `${string}-${string}-${string}-${string}-${string}`; | ||
state: string; | ||
verifier: string; | ||
@@ -15,0 +15,0 @@ }; |
@@ -11,3 +11,3 @@ import { OAuthCallbackQuery, OAuthState } from '../lib/oauth'; | ||
nonce?: `${string}-${string}-${string}-${string}-${string}` | undefined; | ||
state: `${string}-${string}-${string}-${string}-${string}`; | ||
state: string; | ||
verifier: string; | ||
@@ -14,0 +14,0 @@ }; |
@@ -12,3 +12,3 @@ import { OAuthCallbackQuery, OAuthState } from '../lib/oauth'; | ||
nonce?: `${string}-${string}-${string}-${string}-${string}` | undefined; | ||
state: `${string}-${string}-${string}-${string}-${string}`; | ||
state: string; | ||
verifier: string; | ||
@@ -15,0 +15,0 @@ }; |
@@ -11,3 +11,3 @@ import { OAuthCallbackQuery, OAuthState } from '../lib/oauth'; | ||
nonce?: `${string}-${string}-${string}-${string}-${string}` | undefined; | ||
state: `${string}-${string}-${string}-${string}-${string}`; | ||
state: string; | ||
verifier: string; | ||
@@ -14,0 +14,0 @@ }; |
@@ -11,3 +11,3 @@ import { OAuthCallbackQuery, OAuthState } from '../lib/oauth'; | ||
nonce?: `${string}-${string}-${string}-${string}-${string}` | undefined; | ||
state: `${string}-${string}-${string}-${string}-${string}`; | ||
state: string; | ||
verifier: string; | ||
@@ -14,0 +14,0 @@ }; |
@@ -12,3 +12,3 @@ import { OAuthCallbackQuery, OAuthState } from '../lib/oauth'; | ||
nonce?: `${string}-${string}-${string}-${string}-${string}` | undefined; | ||
state: `${string}-${string}-${string}-${string}-${string}`; | ||
state: string; | ||
verifier: string; | ||
@@ -15,0 +15,0 @@ }; |
{ | ||
"name": "express-authenticators", | ||
"version": "1.0.0-pre-1", | ||
"version": "1.0.0-pre-2", | ||
"description": "Third party authenticators in nodejs. Support various providers. Almost zero dependencies.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2058
3
147179