You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### TL;DR
Improved social authentication flexibility by adding support for an optional `redirectUrl` parameter and a new `mobile` mode.
### What changed?
- `getLoginPath.ts`: Added handling for `redirectUrl` and a new mode `mobile`.
- `native-auth.ts`: Updated social login to use `mobile` mode and include `redirectUrl`.
- `auth/middleware.ts`: Enhanced error handling for recovery codes by attempting fallback recovery code method.
- `native-connector.ts`: Fixed typo in console error message and ensured `redirectUrl` defaults correctly for native social logins.
### How to test?
1. Initiate a social login with the added `mobile` mode and verify if the `redirectUrl` functions correctly.
2. Trigger an error scenario in recovery code fetching and check that the fallback method is attempted and appropriate error is thrown if both fail.
3. Check the console for corrected error messages.
### Why make this change?
To increase the robustness and flexibility of social authentication by supporting mobile specific workflows and enhanced error resilience.
---
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
The focus of this PR is to enhance mobile authentication in the thirdweb application by updating redirect URLs and recovery code handling.
### Detailed summary
- Updated authentication mode to "mobile" instead of "popup"
- Added `redirectUrl` parameter for mobile authentication
- Improved error handling for recovery code retrieval
- Modified login path generation to support mobile authentication
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
0 commit comments