mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-16 08:08:56 -05:00
Fix:auto redirect
This commit is contained in:
parent
c7583b2ffe
commit
5724c92b88
@ -118,9 +118,9 @@ export function AuthDialog({
|
|||||||
const content = getStepContent();
|
const content = getStepContent();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm">
|
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4">
|
||||||
<div className="bg-white dark:bg-gray-800 rounded-xl p-6 max-w-md mx-4 shadow-2xl border border-gray-200 dark:border-gray-700">
|
<div className="bg-white dark:bg-gray-800 rounded-xl w-full max-w-md shadow-2xl border border-gray-200 dark:border-gray-700 max-h-[80vh] sm:max-h-[90vh] flex flex-col">
|
||||||
<div className="flex justify-between items-center mb-4">
|
<div className="flex justify-between items-center p-4 sm:p-6 pb-3 sm:pb-4 border-b border-gray-200 dark:border-gray-700 flex-shrink-0">
|
||||||
<h2 className="text-lg font-semibold text-gray-900 dark:text-gray-100">
|
<h2 className="text-lg font-semibold text-gray-900 dark:text-gray-100">
|
||||||
{isError ? 'Error' : content.title}
|
{isError ? 'Error' : content.title}
|
||||||
</h2>
|
</h2>
|
||||||
@ -144,6 +144,7 @@ export function AuthDialog({
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="flex-1 overflow-y-auto p-4 sm:p-6 pt-3 sm:pt-4 min-h-0">
|
||||||
{isError ? (
|
{isError ? (
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<div className="text-red-600 dark:text-red-400 mb-4">
|
<div className="text-red-600 dark:text-red-400 mb-4">
|
||||||
@ -213,5 +214,6 @@ export function AuthDialog({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -378,7 +378,7 @@ export function NeynarAuthButton() {
|
|||||||
}
|
}
|
||||||
// For backend flow, the session will be handled by NextAuth
|
// For backend flow, the session will be handled by NextAuth
|
||||||
},
|
},
|
||||||
[useBackendFlow]
|
[useBackendFlow, fetchUserData]
|
||||||
);
|
);
|
||||||
|
|
||||||
// Error callback
|
// Error callback
|
||||||
@ -538,12 +538,7 @@ export function NeynarAuthButton() {
|
|||||||
setDialogStep('signin');
|
setDialogStep('signin');
|
||||||
setShowDialog(true);
|
setShowDialog(true);
|
||||||
frontendSignIn();
|
frontendSignIn();
|
||||||
|
}, [isError, reconnect, frontendSignIn]);
|
||||||
// Open mobile app if on mobile and URL is available
|
|
||||||
if (url && isMobile()) {
|
|
||||||
window.open(url, '_blank');
|
|
||||||
}
|
|
||||||
}, [isError, reconnect, frontendSignIn, url]);
|
|
||||||
|
|
||||||
const handleSignOut = useCallback(async () => {
|
const handleSignOut = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user