File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed
packages/thirdweb/src/wallets/in-app Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff 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 */
138149export async function authenticate ( args : AuthArgsType ) {
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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 */
145156export async function authenticate ( args : AuthArgsType ) {
You can’t perform that action at this time.
0 commit comments