@avallon-labs/sdk 33.1.0-staging.853 → 34.0.0
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/index.d.ts +16 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2935,11 +2935,15 @@ declare const GetOAuthUrlProvider: {
|
|
|
2935
2935
|
type GetOAuthUrlParams = {
|
|
2936
2936
|
provider: GetOAuthUrlProvider;
|
|
2937
2937
|
redirect_uri: string;
|
|
2938
|
-
code_challenge_method: GetOAuthUrlCodeChallengeMethod;
|
|
2939
2938
|
/**
|
|
2939
|
+
* How code_challenge was derived. Required whenever code_challenge is sent.
|
|
2940
|
+
*/
|
|
2941
|
+
code_challenge_method?: GetOAuthUrlCodeChallengeMethod;
|
|
2942
|
+
/**
|
|
2943
|
+
* PKCE challenge derived from a verifier you keep until sign-in. Omit, together with code_challenge_method, to run the flow without PKCE.
|
|
2940
2944
|
* @minLength 1
|
|
2941
2945
|
*/
|
|
2942
|
-
code_challenge
|
|
2946
|
+
code_challenge?: string;
|
|
2943
2947
|
email?: string;
|
|
2944
2948
|
};
|
|
2945
2949
|
|
|
@@ -4860,8 +4864,13 @@ type SignInBody = {
|
|
|
4860
4864
|
password: string;
|
|
4861
4865
|
} | {
|
|
4862
4866
|
type: "oauth";
|
|
4867
|
+
/** @minLength 1 */
|
|
4863
4868
|
code: string;
|
|
4864
|
-
|
|
4869
|
+
/**
|
|
4870
|
+
* PKCE verifier. Required only when the flow was started with a code_challenge.
|
|
4871
|
+
* @minLength 1
|
|
4872
|
+
*/
|
|
4873
|
+
verifier?: string;
|
|
4865
4874
|
provider?: "google" | "microsoft" | "sso";
|
|
4866
4875
|
} | {
|
|
4867
4876
|
type: "email_otp";
|
|
@@ -6519,7 +6528,7 @@ declare const useSignUp: <TError = ErrorType<ErrorResponse>>(options?: {
|
|
|
6519
6528
|
* Authenticate using one of the supported methods:
|
|
6520
6529
|
|
|
6521
6530
|
- **Password:** Email and password credentials. If the password is correct but the email is not verified yet, responds 403 with `data.pending_authentication_token` and a fresh verification code is emailed; complete verification via **Email OTP**. Each password attempt invalidates earlier codes and tokens, so always use the most recent pair — repeating the password sign-in is also how a new code is requested.
|
|
6522
|
-
- **OAuth:** Authorization code from OAuth flow (social or enterprise SSO). Pass the `provider` the flow was started with so the code is exchanged against the system that issued it.
|
|
6531
|
+
- **OAuth:** Authorization code from OAuth flow (social or enterprise SSO). Pass the `provider` the flow was started with so the code is exchanged against the system that issued it. `verifier` is only required when the flow was started with a `code_challenge` — see **Get OAuth sign-in URL**.
|
|
6523
6532
|
- **Email OTP:** One-time password sent to email. Include the `pending_authentication_token` from sign-up, or from the 403 returned by an unverified user's password sign-in, when completing email verification.
|
|
6524
6533
|
* @summary Sign in
|
|
6525
6534
|
*/
|
|
@@ -6574,7 +6583,9 @@ declare const useRefreshToken: <TError = ErrorType<ErrorResponse>>(options?: {
|
|
|
6574
6583
|
swrKey: string | readonly ["/v1/auth/refresh-token"];
|
|
6575
6584
|
};
|
|
6576
6585
|
/**
|
|
6577
|
-
* Generate an OAuth authorization URL for a given provider.
|
|
6586
|
+
* Generate an OAuth authorization URL for a given provider.
|
|
6587
|
+
|
|
6588
|
+
PKCE is optional. To use it, generate a random verifier, derive `code_challenge` from it, and pass both `code_challenge` and the matching `code_challenge_method` — then send the verifier to **Sign in** when exchanging the code. Omit both to run the flow without PKCE and exchange the code on its own. `provider=microsoft` is PKCE-only: it responds 400 without a challenge.
|
|
6578
6589
|
|
|
6579
6590
|
For enterprise SSO, pass `provider=sso` together with the user's `email`; the email domain selects the SSO organization. Responds 404 when no SSO organization is configured for the domain.
|
|
6580
6591
|
* @summary Get OAuth sign-in URL
|