Comments (2)
I had the same issue, did you find any solution?
from siwe.
@MJoaaquin I started adding various props that were classed as optional till I got it working. Here's a code snippet example of what mine looks like..
import { generateNonce, SiweMessage } from 'siwe'; // version "1.1.6"
function createSiweMessage(address: string) {
const SESSION_DURATION_MS = 1000 * 60 * 60 * 4; // 4 hours (max allowed)
const expirationDate = new Date(Date.now() + SESSION_DURATION_MS);
const message = new SiweMessage({
domain: example.com,
address: address,
statement: 'Sign in with Ethereum',
uri: https://example.com/pathMaybeNeeded,
version: '1',
chainId: 80001,
nonce: generateNonce(),
expirationTime: expirationDate.toISOString(),
});
return message.prepareMessage();
}
It's worth checking if you're calling local host or if you're actually calling an external endpoint with the message.
I hope this helps you!
from siwe.
Related Issues (20)
- Using siwe message giving me error "Buffer is not defined" HOT 2
- ncaught Error: No QueryClient set, use QueryClientProvider to set one
- TypeError: (0 , siwe_parser_1.isEIP55Address) is not a function HOT 1
- Invalid signature recovery are logged via console.error, breaking applications with custom logging flow
- Viem support? HOT 12
- isEIP55Address cannot be called because @spruceid/siwe-parser might be below 2.0.0 version HOT 3
- Suggestion regarding siwe-parser usage of apg-js. HOT 9
- Please provide CDN HOT 1
- Change Provider configuration to allow plain RPC URL property
- Cannot sign in with Argent wallet HOT 1
- Custom logo when authenticating, possible? HOT 4
- Crash on iOS 14 When Initializing SiweMessage Instance HOT 4
- I'm not getting the right address when checking HOT 3
- '"ethers"' has no exported member named 'providers' HOT 1
- Why version "2.1.4", requires SiweMessage.version to be 1? HOT 1
- Module parse failed: 'import' and 'export' may appear only with 'sourceType: module' (2:0) HOT 1
- Cloudflare Workers compatibility HOT 3
- invalid opts check is looking at the wrong array HOT 1
- update quickstart example code to include provider for 1271 support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from siwe.