Skip to content

Commit 80eda00

Browse files
authored
Add optional scope param to challenge method (#89)
* Add optional scope param to challenge method * wip
1 parent 0215036 commit 80eda00

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@authsignal/node",
3-
"version": "2.15.0",
3+
"version": "2.16.0",
44
"main": "./dist/index.js",
55
"module": "./dist/index.mjs",
66
"types": "dist/index.d.ts",

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const DEFAULT_API_URL = "https://api.authsignal.com/v1";
22

3-
export const VERSION = "2.15.0";
3+
export const VERSION = "2.16.0";

src/types.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ export interface ChallengeRequest {
230230
ipAddress?: string;
231231
userAgent?: string;
232232
custom?: CustomData;
233+
scope?: AuthScope;
233234
}
234235

235236
export interface ChallengeResponse {
@@ -408,3 +409,10 @@ export enum VerificationFailureReason {
408409
CODE_INVALID_OR_EXPIRED = "CODE_INVALID_OR_EXPIRED",
409410
MAX_ATTEMPTS_EXCEEDED = "MAX_ATTEMPTS_EXCEEDED",
410411
}
412+
413+
export enum AuthScope {
414+
readAuthenticators = "read:authenticators",
415+
addAuthenticators = "add:authenticators",
416+
removeAuthenticators = "remove:authenticators",
417+
updateAuthenticators = "update:authenticators",
418+
}

0 commit comments

Comments
 (0)