-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
1,087 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
title: Baidu Login with Web3Auth | ||
sidebar_label: Baidu | ||
displayed_sidebar: docs | ||
description: "Baidu Login with Web3Auth | Documentation - Web3Auth" | ||
--- | ||
|
||
## Set up [Baidu](https://marketplace.auth0.com/integrations/baidu-social-connection) via Auth0 | ||
|
||
1. Create a verifier for your Auth0 application by selecting `Auth0` as the Login provider from this modal. | ||
![Baidu - Login Providers list on Web3Auth Dashboard](/images/dashboard/create-verifier-auth0.png) | ||
2. Select the `Other` as the **Authentication Type** based on the dropdown. | ||
![Baidu - Auth0 Authentication Type list on Web3Auth Dashboard](/images/dashboard/create-verifier-google.png) | ||
3. Enter the `Auth0 Client ID` and `Auth0 Domain` from your Auth0 application. See how to create a new Auth0 application | ||
[here](https://auth0.com/docs/quickstart/webapp/). | ||
|
||
![Baidu - Domain and Client ID from Auth0 Dashboard](/images/dashboard/create-verifier-auth0-filled-common.png) | ||
![Baidu - Auth0 Client ID and Auth0 Domain on Web3Auth Dashboard](/images/dashboard/create-verifier-auth0-unfilled.png) | ||
|
||
4. Add the [Baidu Social Connection](https://marketplace.auth0.com/integrations/baidu-social-connection) to your Auth0 application. | ||
5. Click on the `Create` button to create `Baidu` Custom Authentication via Auth0 verifier. | ||
|
||
### Example | ||
|
||
```tsx | ||
import { Web3AuthNoModal } from "@web3auth/no-modal"; | ||
import { OpenloginAdapter } from "@web3auth/openlogin-adapter"; | ||
import { EthereumPrivateKeyProvider } from "@web3auth/ethereum-provider"; | ||
|
||
const clientId = "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ"; | ||
// get it from https://dashboard.web3auth.io by creating a project. | ||
|
||
const chainConfig = { | ||
chainNamespace: "eip155", | ||
chainId: "0x1", | ||
rpcTarget: "https://rpc.ankr.com/eth", | ||
displayName: "Ethereum Mainnet", | ||
blockExplorer: "https://goerli.etherscan.io", | ||
ticker: "ETH", | ||
tickerName: "Ethereum", | ||
}; | ||
|
||
const web3auth = new Web3Auth({ | ||
clientId, | ||
chainConfig, | ||
web3AuthNetwork: "sapphire_mainnet", | ||
}); | ||
|
||
const privateKeyProvider = new EthereumPrivateKeyProvider({ | ||
config: { chainConfig }, | ||
}); | ||
|
||
const openloginAdapter = new OpenloginAdapter({ | ||
privateKeyProvider, | ||
adapterSettings: { | ||
uxMode: "redirect", | ||
loginConfig: { | ||
jwt: { | ||
verifier: "w3a-auth0-uk-demo", // Pass the Verifier name here | ||
typeOfLogin: "jwt", // Pass on the login provider of the verifier you've created | ||
clientId: "OfDAVldBEGslU9wjiWyQ1LPWOWNnnzim", // Pass on the Auth0 `Client ID` here | ||
}, | ||
}, | ||
}, | ||
}); | ||
web3auth.configureAdapter(openloginAdapter); | ||
setWeb3auth(web3auth); | ||
|
||
// Initialize | ||
await web3auth.init(); | ||
|
||
// Login with Baidu | ||
await web3auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, { | ||
loginProvider: "jwt", | ||
extraLoginOptions: { | ||
domain: "https://web3auth.uk.auth0.com", // Pass on the Auth0 `Domain` here | ||
verifierIdField: "sub", // Pass on the field name of the `sub` field in the JWT | ||
connection: "baidu", // Use this to skip Auth0 Modal for Baidu login | ||
}, | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
title: Bitbucket Login with Web3Auth | ||
sidebar_label: Bitbucket | ||
displayed_sidebar: docs | ||
description: "Bitbucket Login with Web3Auth | Documentation - Web3Auth" | ||
--- | ||
|
||
## Set up [Bitbucket](https://marketplace.auth0.com/integrations/bitbucket-social-connection) via Auth0 | ||
|
||
1. Create a verifier for your Auth0 application by selecting `Auth0` as the Login provider from this modal. | ||
![Bitbucket - Login Providers list on Web3Auth Dashboard](/images/dashboard/create-verifier-auth0.png) | ||
2. Select the `Other` as the **Authentication Type** based on the dropdown. | ||
![Bitbucket - Auth0 Authentication Type list on Web3Auth Dashboard](/images/dashboard/create-verifier-google.png) | ||
3. Enter the `Auth0 Client ID` and `Auth0 Domain` from your Auth0 application. See how to create a new Auth0 application | ||
[here](https://auth0.com/docs/quickstart/webapp/). | ||
|
||
![Bitbucket - Domain and Client ID from Auth0 Dashboard](/images/dashboard/create-verifier-auth0-filled-common.png) | ||
![Bitbucket - Auth0 Client ID and Auth0 Domain on Web3Auth Dashboard](/images/dashboard/create-verifier-auth0-unfilled.png) | ||
|
||
4. Add the [Bitbucket Social Connection](https://marketplace.auth0.com/integrations/bitbucket-social-connection) to your Auth0 application. | ||
5. Click on the `Create` button to create `Bitbucket` Custom Authentication via Auth0 verifier. | ||
|
||
### Example | ||
|
||
```tsx | ||
import { Web3AuthNoModal } from "@web3auth/no-modal"; | ||
import { OpenloginAdapter } from "@web3auth/openlogin-adapter"; | ||
import { EthereumPrivateKeyProvider } from "@web3auth/ethereum-provider"; | ||
|
||
const clientId = "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ"; | ||
// get it from https://dashboard.web3auth.io by creating a project. | ||
|
||
const chainConfig = { | ||
chainNamespace: "eip155", | ||
chainId: "0x1", | ||
rpcTarget: "https://rpc.ankr.com/eth", | ||
displayName: "Ethereum Mainnet", | ||
blockExplorer: "https://goerli.etherscan.io", | ||
ticker: "ETH", | ||
tickerName: "Ethereum", | ||
}; | ||
|
||
const web3auth = new Web3Auth({ | ||
clientId, | ||
chainConfig, | ||
web3AuthNetwork: "sapphire_mainnet", | ||
}); | ||
|
||
const privateKeyProvider = new EthereumPrivateKeyProvider({ | ||
config: { chainConfig }, | ||
}); | ||
|
||
const openloginAdapter = new OpenloginAdapter({ | ||
privateKeyProvider, | ||
adapterSettings: { | ||
uxMode: "redirect", | ||
loginConfig: { | ||
jwt: { | ||
verifier: "w3a-auth0-uk-demo", // Pass the Verifier name here | ||
typeOfLogin: "jwt", // Pass on the login provider of the verifier you've created | ||
clientId: "OfDAVldBEGslU9wjiWyQ1LPWOWNnnzim", // Pass on the Auth0 `Client ID` here | ||
}, | ||
}, | ||
}, | ||
}); | ||
web3auth.configureAdapter(openloginAdapter); | ||
setWeb3auth(web3auth); | ||
|
||
// Initialize | ||
await web3auth.init(); | ||
|
||
// Login with Bitbucket | ||
await web3auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, { | ||
loginProvider: "jwt", | ||
extraLoginOptions: { | ||
domain: "https://web3auth.uk.auth0.com", // Pass on the Auth0 `Domain` here | ||
verifierIdField: "sub", // Pass on the field name of the `sub` field in the JWT | ||
connection: "bitbucket", // Use this to skip Auth0 Modal for Bitbucket login | ||
}, | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.