Skip to content

Commit 7641cb8

Browse files
committed
docs
1 parent c008038 commit 7641cb8

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

packages/thirdweb/src/wallets/in-app/native/auth/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@ export async function preAuthenticate(args: PreAuthArgsType) {
133133
* verificationCode: "123456",
134134
* });
135135
* ```
136+
*
137+
* Authenticate to a backend account (only do this on your backend):
138+
* ```ts
139+
* import { authenticate } from "thirdweb/wallets/in-app";
140+
*
141+
* const result = await authenticate({
142+
* client,
143+
* strategy: "backend",
144+
* walletSecret: "...", // Provided by your app
145+
* });
146+
* ```
136147
* @wallet
137148
*/
138149
export async function authenticate(args: AuthArgsType) {

packages/thirdweb/src/wallets/in-app/web/in-app.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,20 @@ import { createInAppWallet } from "../core/wallet/in-app-core.js";
139139
* });
140140
* ```
141141
*
142+
* ### Connect to a backend account
143+
*
144+
* ```ts
145+
* import { inAppWallet } from "thirdweb/wallets";
146+
*
147+
* const wallet = inAppWallet();
148+
*
149+
* const account = await wallet.connect({
150+
* client,
151+
* strategy: "backend",
152+
* walletSecret: "...", // Provided by your app
153+
* });
154+
* ```
155+
*
142156
* ### Connect with custom JWT (any OIDC provider)
143157
*
144158
* You can use any OIDC provider to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings.

packages/thirdweb/src/wallets/in-app/web/lib/auth/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,17 @@ export async function preAuthenticate(args: PreAuthArgsType) {
140140
* verificationCode: "123456",
141141
* });
142142
* ```
143+
*
144+
* Authenticate to a backend account (only do this on your backend):
145+
* ```ts
146+
* import { authenticate } from "thirdweb/wallets/in-app";
147+
*
148+
* const result = await authenticate({
149+
* client,
150+
* strategy: "backend",
151+
* walletSecret: "...", // Provided by your app
152+
* });
153+
* ```
143154
* @wallet
144155
*/
145156
export async function authenticate(args: AuthArgsType) {

0 commit comments

Comments
 (0)