@erikey/react 0.4.23 → 0.4.25
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.mts +51 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +3 -3
- package/dist/styles.css.map +1 -1
- package/dist/ui/index.mjs +264 -47
- package/dist/ui/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -801,6 +801,52 @@ interface AuthClientConfig {
|
|
|
801
801
|
* ```
|
|
802
802
|
*/
|
|
803
803
|
declare function createAuthClient(config: AuthClientConfig): {
|
|
804
|
+
siwe: {
|
|
805
|
+
nonce: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
806
|
+
walletAddress: string;
|
|
807
|
+
chainId?: number;
|
|
808
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any>>>(data_0: better_auth.Prettify<{
|
|
809
|
+
walletAddress: string;
|
|
810
|
+
chainId?: number;
|
|
811
|
+
} & {
|
|
812
|
+
fetchOptions?: FetchOptions;
|
|
813
|
+
}>, data_1?: FetchOptions) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
814
|
+
nonce: string;
|
|
815
|
+
}, {
|
|
816
|
+
code?: string | undefined;
|
|
817
|
+
message?: string | undefined;
|
|
818
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
819
|
+
};
|
|
820
|
+
} & {
|
|
821
|
+
siwe: {
|
|
822
|
+
verify: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
823
|
+
message: string;
|
|
824
|
+
signature: string;
|
|
825
|
+
walletAddress: string;
|
|
826
|
+
chainId?: number;
|
|
827
|
+
email?: string;
|
|
828
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any>>>(data_0: better_auth.Prettify<{
|
|
829
|
+
message: string;
|
|
830
|
+
signature: string;
|
|
831
|
+
walletAddress: string;
|
|
832
|
+
chainId?: number;
|
|
833
|
+
email?: string;
|
|
834
|
+
} & {
|
|
835
|
+
fetchOptions?: FetchOptions;
|
|
836
|
+
}>, data_1?: FetchOptions) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
837
|
+
token: string;
|
|
838
|
+
success: boolean;
|
|
839
|
+
user: {
|
|
840
|
+
id: string;
|
|
841
|
+
walletAddress: string;
|
|
842
|
+
chainId: number;
|
|
843
|
+
};
|
|
844
|
+
}, {
|
|
845
|
+
code?: string | undefined;
|
|
846
|
+
message?: string | undefined;
|
|
847
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
848
|
+
};
|
|
849
|
+
} & {
|
|
804
850
|
signIn: {
|
|
805
851
|
social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
806
852
|
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
@@ -1397,7 +1443,11 @@ declare function createAuthClient(config: AuthClientConfig): {
|
|
|
1397
1443
|
body?: any;
|
|
1398
1444
|
query?: any;
|
|
1399
1445
|
params?: any;
|
|
1400
|
-
duplex
|
|
1446
|
+
duplex
|
|
1447
|
+
/**
|
|
1448
|
+
* Type helper for inferring the auth client type
|
|
1449
|
+
*/
|
|
1450
|
+
?: "full" | "half" | undefined;
|
|
1401
1451
|
jsonParser: (text: string) => Promise<any> | any;
|
|
1402
1452
|
retry?: _better_fetch_fetch.RetryOptions | undefined;
|
|
1403
1453
|
retryAttempt?: number | undefined;
|
package/dist/index.mjs
CHANGED
|
@@ -1407,7 +1407,9 @@ function createAuthClient3(config) {
|
|
|
1407
1407
|
baseURL: baseUrl,
|
|
1408
1408
|
fetchOptions,
|
|
1409
1409
|
// For same-origin, include cookies (cross-origin uses Bearer from fetchOptions.auth)
|
|
1410
|
-
...!useBearerAuth && { credentials: "include" }
|
|
1410
|
+
...!useBearerAuth && { credentials: "include" },
|
|
1411
|
+
// Enable SIWE (Sign-In with Ethereum) support
|
|
1412
|
+
plugins: [siweClient()]
|
|
1411
1413
|
});
|
|
1412
1414
|
return client;
|
|
1413
1415
|
}
|