TypeError: Cannot destructure property 'baseUrl' of 'e' as it is undefined.
- Dominant language
- TypeScript
- Stars
- 181
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
Hey, i've been implement this code as well
```javascript
import TorusServiceProvider from "@tkey/service-provider-torus";
const serviceProvider = new TorusServiceProvider({
customAuthArgs:{
baseUrl: `${window.location.origin}/login`,
enableLogging: false,
redirectPathName: "auth",
uxMode: "redirect",
redirectToOpener: true,
//proxyContractAddress: "0x4023d2a0D330bF11426B12C6144Cfb96B7fa6183", // details for test net
network: REACT_APP_TORUS_NETWORK,
networkUrl: REACT_APP_TORUS_NETWORK_URL
}
});
```
then i got this:
on my local it was working fine, but error on production (deployed on domain)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure on the deployed domain and inspect the TorusServiceProvider initialization shown in the issue, especially customAuthArgs and the production environment values. Done means the deployed application initializes without the destructuring TypeError while retaining the intended authentication redirect behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- authentication, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100