Skip to content

Commit 7625a8b

Browse files
authored
Merge pull request #672 from pixelplex/ton-proof-backend
add backend example for ton proof
2 parents 71d5e2b + 435a67d commit 7625a8b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/develop/dapps/ton-connect/sign.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function App() {
7878
}
7979
```
8080

81-
2. Implement authentication on backend:
81+
2. Implement authentication on the frontend with backend integration:
8282

8383
<details>
8484
<summary>Example</summary>
@@ -152,6 +152,12 @@ export function useBackendAuth() {
152152
```
153153
</details>
154154

155+
## Backend Example
156+
157+
You can review our [example](https://github.com/ton-connect/demo-dapp-with-react-ui/tree/master/src/server) showcasing the key methods:
158+
- [generatePayload](https://github.com/ton-connect/demo-dapp-with-react-ui/blob/master/src/server/api/generate-payload.ts): Generates a payload for ton proof
159+
- [checkProof](https://github.com/ton-connect/demo-dapp-with-react-ui/blob/master/src/server/api/check-proof.ts): Checks the proof and returns an access token.
160+
155161
## Concept Explanation
156162

157163
If `TonProofItem` is requested, wallet proves ownership of the selected account’s key. The signed message is bound to:

0 commit comments

Comments
 (0)