@b3dotfun/sdk 0.1.69-alpha.19 → 0.1.69-alpha.20
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.
|
@@ -243,12 +243,15 @@ function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySuccess, onE
|
|
|
243
243
|
else if (step === "login") {
|
|
244
244
|
// Show loading spinner while: authenticating, waiting for pre-login logout to finish,
|
|
245
245
|
// or fetching signers.
|
|
246
|
-
if (
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
if (authStrategy === "better-auth") {
|
|
247
|
+
// Better Auth manages its own loading/verification states internally.
|
|
248
|
+
// Don't gate on isAuthenticating — it would unmount the component
|
|
249
|
+
// and lose verification state when setIsAuthenticating(false) fires.
|
|
250
250
|
content = (0, jsx_runtime_1.jsx)(LoginStepBetterAuth_1.LoginStepBetterAuth, { onSuccess: () => handleLoginSuccess({}), onError: onError });
|
|
251
251
|
}
|
|
252
|
+
else if (!readyToShowLogin || isAuthenticating || isFetchingSigners) {
|
|
253
|
+
content = ((0, jsx_runtime_1.jsx)(LoginStep_1.LoginStepContainer, { partnerId: partnerId, children: (0, jsx_runtime_1.jsx)("div", { className: "my-8 flex min-h-[350px] items-center justify-center", children: (0, jsx_runtime_1.jsx)(react_1.Loading, { variant: "white", size: "lg" }) }) }));
|
|
254
|
+
}
|
|
252
255
|
else {
|
|
253
256
|
// Custom strategy
|
|
254
257
|
if (strategies?.[0] === "privy") {
|
|
@@ -240,12 +240,15 @@ export function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySucce
|
|
|
240
240
|
else if (step === "login") {
|
|
241
241
|
// Show loading spinner while: authenticating, waiting for pre-login logout to finish,
|
|
242
242
|
// or fetching signers.
|
|
243
|
-
if (
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
243
|
+
if (authStrategy === "better-auth") {
|
|
244
|
+
// Better Auth manages its own loading/verification states internally.
|
|
245
|
+
// Don't gate on isAuthenticating — it would unmount the component
|
|
246
|
+
// and lose verification state when setIsAuthenticating(false) fires.
|
|
247
247
|
content = _jsx(LoginStepBetterAuth, { onSuccess: () => handleLoginSuccess({}), onError: onError });
|
|
248
248
|
}
|
|
249
|
+
else if (!readyToShowLogin || isAuthenticating || isFetchingSigners) {
|
|
250
|
+
content = (_jsx(LoginStepContainer, { partnerId: partnerId, children: _jsx("div", { className: "my-8 flex min-h-[350px] items-center justify-center", children: _jsx(Loading, { variant: "white", size: "lg" }) }) }));
|
|
251
|
+
}
|
|
249
252
|
else {
|
|
250
253
|
// Custom strategy
|
|
251
254
|
if (strategies?.[0] === "privy") {
|
package/package.json
CHANGED
|
@@ -288,7 +288,12 @@ export function SignInWithB3Flow({
|
|
|
288
288
|
} else if (step === "login") {
|
|
289
289
|
// Show loading spinner while: authenticating, waiting for pre-login logout to finish,
|
|
290
290
|
// or fetching signers.
|
|
291
|
-
if (
|
|
291
|
+
if (authStrategy === "better-auth") {
|
|
292
|
+
// Better Auth manages its own loading/verification states internally.
|
|
293
|
+
// Don't gate on isAuthenticating — it would unmount the component
|
|
294
|
+
// and lose verification state when setIsAuthenticating(false) fires.
|
|
295
|
+
content = <LoginStepBetterAuth onSuccess={() => handleLoginSuccess({} as Account)} onError={onError} />;
|
|
296
|
+
} else if (!readyToShowLogin || isAuthenticating || isFetchingSigners) {
|
|
292
297
|
content = (
|
|
293
298
|
<LoginStepContainer partnerId={partnerId}>
|
|
294
299
|
<div className="my-8 flex min-h-[350px] items-center justify-center">
|
|
@@ -296,8 +301,6 @@ export function SignInWithB3Flow({
|
|
|
296
301
|
</div>
|
|
297
302
|
</LoginStepContainer>
|
|
298
303
|
);
|
|
299
|
-
} else if (authStrategy === "better-auth") {
|
|
300
|
-
content = <LoginStepBetterAuth onSuccess={() => handleLoginSuccess({} as Account)} onError={onError} />;
|
|
301
304
|
} else {
|
|
302
305
|
// Custom strategy
|
|
303
306
|
if (strategies?.[0] === "privy") {
|