@stacksjs/auth 0.75.38 → 0.75.40
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/dist/gate.d.ts +1 -1
- package/dist/oauth-authorization.d.ts +2 -2
- package/dist/passkey.d.ts +1 -1
- package/dist/tokens.d.ts +4 -16
- package/package.json +13 -13
package/dist/gate.d.ts
CHANGED
|
@@ -320,7 +320,7 @@ export declare class AuthorizationResponse {
|
|
|
320
320
|
*/
|
|
321
321
|
export declare class AuthorizationException extends Error {
|
|
322
322
|
public readonly code?: string;
|
|
323
|
-
public readonly status
|
|
323
|
+
public readonly status: number;
|
|
324
324
|
constructor(message?: string, code?: string, status?: number);
|
|
325
325
|
}
|
|
326
326
|
export default Gate;
|
|
@@ -55,7 +55,7 @@ export type OAuthAuthorizationRequestErrorCode = | 'invalid_request'
|
|
|
55
55
|
/** A protocol failure plus the only callback target that is safe to use. */
|
|
56
56
|
export declare class OAuthAuthorizationRequestError extends Error {
|
|
57
57
|
public readonly code: OAuthAuthorizationRequestErrorCode;
|
|
58
|
-
public readonly redirectUri
|
|
59
|
-
public readonly state
|
|
58
|
+
public readonly redirectUri: string | null;
|
|
59
|
+
public readonly state: string | null;
|
|
60
60
|
constructor(code: OAuthAuthorizationRequestErrorCode, message: string, redirectUri?: string | null, state?: string | null);
|
|
61
61
|
}
|
package/dist/passkey.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare function getUserPasskey(userId: number, passkeyId: string): Promi
|
|
|
40
40
|
* stacksjs/stacks#1861 A-4.
|
|
41
41
|
*/
|
|
42
42
|
export declare function updatePasskeyCounter(userId: number, passkeyId: string, newCounter: number): Promise<boolean>;
|
|
43
|
-
export declare function setCurrentRegistrationOptions(verified: VerifiedRegistrationResponse): Promise<void>;
|
|
43
|
+
export declare function setCurrentRegistrationOptions(user: { id: number, email?: string }, verified: VerifiedRegistrationResponse): Promise<void>;
|
|
44
44
|
/**
|
|
45
45
|
* Persist a server-issued WebAuthn challenge for the given user +
|
|
46
46
|
* purpose. Deletes any prior challenge for the same (user, purpose)
|
package/dist/tokens.d.ts
CHANGED
|
@@ -108,29 +108,17 @@ export declare function tokenAbilities(): Promise<string[]>;
|
|
|
108
108
|
* console.log(result.refreshToken) // Use this to get new access tokens
|
|
109
109
|
*/
|
|
110
110
|
export declare function createToken(userId: number, name?: string, scopes?: string[], options?: {
|
|
111
|
-
|
|
111
|
+
|
|
112
112
|
clientId?: number
|
|
113
113
|
expiresInMinutes?: number
|
|
114
114
|
expiresAt?: Date
|
|
115
115
|
withRefreshToken?: boolean
|
|
116
116
|
refreshExpiresInDays?: number
|
|
117
|
-
|
|
118
|
-
* What the browser called itself, when there is one.
|
|
119
|
-
*
|
|
120
|
-
* Stored so a person can recognise their own sessions on a list well enough
|
|
121
|
-
* to revoke one. Untrusted - it is a string a client chose - which is why
|
|
122
|
-
* it sits beside the address rather than instead of it, and why nothing
|
|
123
|
-
* authorises on it.
|
|
124
|
-
*/
|
|
117
|
+
|
|
125
118
|
userAgent?: string | null
|
|
126
|
-
|
|
119
|
+
|
|
127
120
|
ipAddress?: string | null
|
|
128
|
-
|
|
129
|
-
* The owner's table, for a token that does not belong to a user.
|
|
130
|
-
*
|
|
131
|
-
* `oauth_access_tokens` is polymorphic; a caller that passes only an id
|
|
132
|
-
* gets `users`, which is what every caller predating the pair meant.
|
|
133
|
-
*/
|
|
121
|
+
|
|
134
122
|
tokenableType?: string
|
|
135
123
|
}): Promise<PersonalAccessTokenResult>;
|
|
136
124
|
/**
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/auth",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.40",
|
|
6
6
|
"description": "A more simplistic way to authenticate.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -58,18 +58,18 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@stacksjs/bun-router": "^0.1.18",
|
|
61
|
-
"@stacksjs/cache": "0.75.
|
|
62
|
-
"@stacksjs/config": "0.75.
|
|
63
|
-
"@stacksjs/database": "0.75.
|
|
64
|
-
"@stacksjs/email": "0.75.
|
|
65
|
-
"@stacksjs/env": "0.75.
|
|
66
|
-
"@stacksjs/error-handling": "0.75.
|
|
67
|
-
"@stacksjs/logging": "0.75.
|
|
68
|
-
"@stacksjs/orm": "0.75.
|
|
69
|
-
"@stacksjs/path": "0.75.
|
|
70
|
-
"@stacksjs/router": "0.75.
|
|
71
|
-
"@stacksjs/security": "0.75.
|
|
72
|
-
"@stacksjs/storage": "0.75.
|
|
61
|
+
"@stacksjs/cache": "0.75.40",
|
|
62
|
+
"@stacksjs/config": "0.75.40",
|
|
63
|
+
"@stacksjs/database": "0.75.40",
|
|
64
|
+
"@stacksjs/email": "0.75.40",
|
|
65
|
+
"@stacksjs/env": "0.75.40",
|
|
66
|
+
"@stacksjs/error-handling": "0.75.40",
|
|
67
|
+
"@stacksjs/logging": "0.75.40",
|
|
68
|
+
"@stacksjs/orm": "0.75.40",
|
|
69
|
+
"@stacksjs/path": "0.75.40",
|
|
70
|
+
"@stacksjs/router": "0.75.40",
|
|
71
|
+
"@stacksjs/security": "0.75.40",
|
|
72
|
+
"@stacksjs/storage": "0.75.40",
|
|
73
73
|
"@stacksjs/ts-auth": "^0.4.4",
|
|
74
74
|
"ts-qr-codes": "^0.1.8"
|
|
75
75
|
},
|