MananTank a24de21f00 Fix no redirect to dashboard if user is already logged in and lands on login page (#4561)
Did not go the middleware route here because even if we properly check the logged in status in middleware and redirect - it's possible for user to get stuck in that case if for some reason the wallet never gets into "connecting" status and so the useLoggedInUser query never runs and never redirects the user to login page ( and even if it did - they would immediately get redirected to other page because they have a "valid" auth cookie )

so safest solution here is to let the user land on login page and once then redirect from there after wallet connection + sign in is done

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the login process in the dashboard app.

### Detailed summary
- Removed unused imports and functions
- Refactored `doLogin` function to handle redirect logic internally
- Added `useDashboardRouter` hook to handle navigation
- Improved error handling and redirect logic in the login process

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-12 18:37:42 +00:00
2024-09-13 06:10:23 +12:00
2024-09-05 11:48:44 -07:00
2024-04-10 08:44:09 -07:00
2024-02-06 13:52:51 -08:00
2024-08-23 17:08:31 +00:00
2024-06-18 22:42:01 -07:00
2023-03-31 01:28:56 +00:00
2024-09-11 02:35:34 +00:00
2024-08-06 15:44:36 -07:00
2024-08-22 16:36:54 +00:00



thirdweb TypeScript SDK

Build Status Join our Discord!

All-in-one web3 SDK for Browser, Node and Mobile apps

Features

  • Support for React & React-Native
  • First party support for Embedded Wallets (social/email login)
  • First party support for Account Abstraction
  • Instant connection to any chain with RPC Edge integration
  • Integrated IPFS upload/download
  • UI Components for connection, transactions, nft rendering
  • High level contract extensions for interacting with common standards
  • Automatic ABI resolution

Library Comparison

thirdweb Wagmi + Viem Ethers@6
Type safe contract API ✅ ✅ ✅
Type safe wallet API ✅ ✅ ✅
EVM utils ✅ ✅ ✅
RPC for any EVM ✅  ⚠️ public RPC only ❌
Automatic ABI Resolution ✅ ❌ ❌
IPFS Upload/Download ✅ ❌ ❌
Embedded wallet (email/ social login) ✅ ⚠️ via 3rd party ❌
Account abstraction (ERC4337) support ✅ ⚠️ via 3rd party ❌
Web3 wallet connectors ✅ ✅ ❌
Local wallet creation ✅ ✅ ✅
Auth (SIWE) ✅ ✅ ❌
Extensions functions for common standards ✅ ✅ ❌
React Hooks ✅ ✅ ❌
React UI components ✅ ❌ ❌
React Native Hooks ✅ ✅ ❌
React Native UI Components ✅ ❌ ❌

Contributing

We welcome contributions from all developers regardless of experience level. If you are interested in contributing, please read our Contributing Guide to learn how the repo works, how to test your changes, and how to submit a pull request.

See our open source page for more information on our open-source bounties and program.

Additional Resources

Support

For help or feedback, please visit our support site

Security

If you believe you have found a security vulnerability in any of our packages, we kindly ask you not to open a public issue; and to disclose this to us by emailing [email protected].

S
Description
No description provided
Readme
1.1 GiB
Languages
TypeScript 87.9%
MDX 11.1%
JavaScript 0.6%
CSS 0.4%