feeef 0.9.3 → 0.9.4
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.
|
@@ -151,6 +151,27 @@ export interface SigninWithSocialOptions {
|
|
|
151
151
|
code: string;
|
|
152
152
|
fcmToken?: string | null;
|
|
153
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Options for creating a short-lived, single-use Feeef auth code (QR / device login).
|
|
156
|
+
*/
|
|
157
|
+
export interface CreateAuthCodeOptions {
|
|
158
|
+
/** Optional deep-link destination to return alongside the code. */
|
|
159
|
+
redirect?: string;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Response from creating an auth code.
|
|
163
|
+
*/
|
|
164
|
+
export interface CreateAuthCodeResponse {
|
|
165
|
+
authCode: string;
|
|
166
|
+
expiresInSeconds: number;
|
|
167
|
+
redirect: string | null;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Options for signing in with a one-time Feeef auth code (OAuth-like semantics).
|
|
171
|
+
*/
|
|
172
|
+
export interface SigninWithCodeOptions {
|
|
173
|
+
authCode: string;
|
|
174
|
+
}
|
|
154
175
|
/**
|
|
155
176
|
* Options for passkey registration start.
|
|
156
177
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { ModelRepository } from './repository.js';
|
|
3
|
-
import { AccessToken, AuthToken, CreateUserOptions, FinishPasskeyAuthenticationOptions, FinishPasskeyRegistrationOptions, LinkSocialAccountOptions, Passkey, SigninCredentials, SigninWithSocialOptions, SignupCredentials, TransferMoneyOptions, TransferMoneyResponse, UpdateUserOptions, UserEntity, UserUpdate, StartPasskeyAuthenticationOptions, StartPasskeyRegistrationOptions } from '../../core/entities/user.js';
|
|
3
|
+
import { AccessToken, AuthToken, CreateUserOptions, FinishPasskeyAuthenticationOptions, FinishPasskeyRegistrationOptions, LinkSocialAccountOptions, Passkey, CreateAuthCodeOptions, CreateAuthCodeResponse, SigninCredentials, SigninWithCodeOptions, SigninWithSocialOptions, SignupCredentials, TransferMoneyOptions, TransferMoneyResponse, UpdateUserOptions, UserEntity, UserUpdate, StartPasskeyAuthenticationOptions, StartPasskeyRegistrationOptions } from '../../core/entities/user.js';
|
|
4
4
|
/**
|
|
5
5
|
* Represents the response returned by the authentication process.
|
|
6
6
|
*/
|
|
@@ -51,6 +51,18 @@ export declare class UserRepository extends ModelRepository<UserEntity, CreateUs
|
|
|
51
51
|
* @returns A promise that resolves to the authentication response.
|
|
52
52
|
*/
|
|
53
53
|
signinWithToken(token: string, fcmToken?: string | null): Promise<AuthResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* Generates a short-lived, single-use Feeef auth code for cross-device / QR login.
|
|
56
|
+
*
|
|
57
|
+
* POST `/users/auth/code` (auth required).
|
|
58
|
+
*/
|
|
59
|
+
createAuthCode(options?: CreateAuthCodeOptions): Promise<CreateAuthCodeResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Signs in using a one-time Feeef auth code (OAuth-like semantics).
|
|
62
|
+
*
|
|
63
|
+
* POST `/users/auth/code/consume` (public). On success it returns a bearer token and user.
|
|
64
|
+
*/
|
|
65
|
+
signinWithCode(options: SigninWithCodeOptions): Promise<AuthResponse>;
|
|
54
66
|
/**
|
|
55
67
|
* Signs out the currently authenticated user.
|
|
56
68
|
* Deletes the token on the server and clears local auth state.
|