Skip to content

Commit

Permalink
fix & format email_passwordless use
Browse files Browse the repository at this point in the history
  • Loading branch information
shahbaz17 committed Oct 23, 2024
1 parent 6dd3a2c commit 639c91f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
3 changes: 2 additions & 1 deletion docs/auth-provider-setup/aggregate-verifier.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ const authAdapter = new AuthAdapter({
email_passwordless: {
verifier: "aggregate-sapphire", // Pass the Verifier name here. eg. aggregate-sapphire
verifierSubIdentifier: "w3a-email-passwordless", // Pass the Sub-Verifier here. eg w3a-email-passwordless
typeOfLogin: "email_passwordless", // Pass the type of login provider. For Auth0, it's jwt and not Auth0.
typeOfLogin: "email_passwordless", // Pass the type of login provider.
clientId, // Pass the Web3Auth `Client ID` here.
},
},
},
Expand Down
30 changes: 23 additions & 7 deletions docs/auth-provider-setup/social-providers/email-passwordless.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const authAdapter = new AuthAdapter({
email_passwordless: {
verifier: "w3a-email-passwordless-demo", // Pass your verifier name here
typeOfLogin: "email_passwordless",
clientId, // Pass the Web3Auth `Client ID` here.
},
// focus-end
},
Expand All @@ -69,23 +70,38 @@ await web3authInstance.connect();
</TabItem>

<TabItem value="nomodal">

```tsx
import { AuthAdapter } from "@web3auth/auth-adapter";

// Create AuthAdapter instance once you have created Web3AuthNoModal instance const authAdapter =
new AuthAdapter({ adapterSettings: { uxMode: "redirect", loginConfig: { // focus-start
email_passwordless: { verifier: "w3a-sms-passwordless-demo", // Pass your verifier name here
typeOfLogin: "email_passwordless", }, // focus-end }, }, });
// Create AuthAdapter instance once you have created Web3AuthNoModal instance

const authAdapter = new AuthAdapter({
adapterSettings: {
uxMode: "redirect",
loginConfig: {
// focus-start
email_passwordless: {
verifier: "w3a-email-passwordless-demo", // Pass your verifier name
typeOfLogin: "email_passwordless",
clientId, // Pass the Web3Auth `Client ID` here.
},
// focus-end
},
},
});

// Configure the adapter with Web3AuthNoModal web3authNoModalInstance.configureAdapter(authAdapter);

// Initialize await web3authNoModalInstance.init();

// Login with Email Passwordless // focus-start await
web3authNoModalInstance.connectTo(WALLET_ADAPTERS.AUTH, { loginProvider: "email_passwordless",
extraLoginOptions: { login_hint: email.trim(), }, }); // focus-end

web3authNoModalInstance.connectTo(WALLET_ADAPTERS.AUTH, {
loginProvider: "email_passwordless",
extraLoginOptions: { login_hint: email.trim() },
}); // focus-end
```

</TabItem>
</Tabs>
```

0 comments on commit 639c91f

Please sign in to comment.