Skip to content

Commit 1d96598

Browse files
authored
fix: update sso documentation (#379)
1 parent 52fe915 commit 1d96598

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

content/00.zksync-era/30.unique-features/30.zksync-sso/23.sessions.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ type ConstraintCondition =
191191

192192
## Paymasters
193193

194-
General paymasters are supported with sessions.
195-
Approval-based paymasters are not yet supported.
194+
Paymasters can be used to pay for the session transaction fees.
196195

197196
```ts
198197
const transactionHash = await writeContract(wagmiConfig, {

content/00.zksync-era/30.unique-features/30.zksync-sso/5.getting-started.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ Just 2 steps:
8686
}),
8787
],
8888
},
89+
// Optional: Receive notifications about session state changes
90+
onSessionStateChange: ({ state, address, chainId }) => {
91+
console.log(`Session state for address ${address} changed: ${state.type} - ${state.message}`);
92+
93+
// Use this to notify users and restart the session if needed
94+
// - Session expired: state.type === 'session_expired'
95+
// - Session inactive (e.g. was revoked): state.type === 'session_inactive'
96+
},
8997
});
9098
9199
const wagmiConfig = createConfig({
@@ -149,6 +157,15 @@ Just 2 steps:
149157
}),
150158
],
151159
},
160+
161+
// Optional: Receive notifications about session state changes
162+
onSessionStateChange: ({ state, address, chainId }) => {
163+
console.log(`Session state for address ${address} changed: ${state.type} - ${state.message}`);
164+
165+
// Use this to notify users and restart the session if needed
166+
// - Session expired: state.type === 'session_expired'
167+
// - Session inactive (e.g. was revoked): state.type === 'session_inactive'
168+
},
152169
});
153170
154171
const wagmiConfig = defaultWagmiConfig({

0 commit comments

Comments
 (0)