# tKey Simplified Guide Steps
To work with `tKey`, one has to create a Web3Auth Verifier from the Custom Auth section of the Dashboard.
> Check out how to create a [Custom Verifier](https://web3auth.io/docs/custom-authentication/verifiers) on the Web3Auth Dashboard.
**Understanding Shares**
* `Share A`: Social Login Share [TorusServiceProvider, ...]
* `Share B`: Device Share [WebStorageModule, ChromeExtensionStorageModule, ShareTransferModule ...]
* `Share C`: Backup Share [ShareSerializationModule, SecurityQuestionsModule ...]
## Install the `tKey` package.
```bash
yarn add @tkey/default
```
> Currently, `@tkey/default` doesn't have web storage or chrome extension storage. [Reference](https://github.com/tkey/tkey/blob/master/packages/default/src/index.ts#L10), which is expected behaviour to reduce the package size. But to start with 2/2 flow, we can pass webStorageModule, chromeExtensionStorage
## tKey Setup
```jsx!
import ThresholdKey from "@tkey/default";
import WebStorageModule from "@tkey/web-storage";
const customAuthArgs = {
baseUrl: 'http://localhost:3000/serviceworker/redirect',
network: 'testnet',
networkUrl: 'https://small-long-brook.ropsten.quiknode.pro/e2fd2eb01412e80623787d1c40094465aa67624a'
}
const webStorageModule = new WebStorageModule(); // <-- this is one of the modules you can use for Share B
const tKey = new ThresholdKey({
modules: { webStorage: webStorageModule},
// For 2/2 flow, Share B (Device Share) modules must be passed here to work.
customAuthArgs
});
```
## Skip the Service Worker for serviceProvider
```jsx!
await tKey.serviceProvider.init();
```
> Don't work with Redirect flow, one has to use SW.js file and serviceworker.
## Triggering Login using Service Provider
```jsx!
const loginResponse = await tKey.serviceProvider.triggerLogin({
typeOfLogin: "google",
verifier: "web3auth-core-google",
clientId: "774338308167-q463s7kpvja16l4l0kko3nb925ikds2p.apps.googleusercontent.com",
});
```
<!--
> On `/callback` page, we get the loginResult by calling getRedirectResult
```jsx!
const loginDetails = await tKey.serviceProvider.directWeb.getRedirectResult();
``` -->
## Initialize
```jsx!
await tKey.initialize();
```
<!-- > Because of https://github.com/tkey/tkey/blob/master/packages/core/src/core.ts#L237 line, we need to pass serviceProvider in tKey initialization. -->
<!--
> We should never use the _initializeNewKey(), rather use generateNewShare()
```jsx!
await tKey._initializeNewKey(); // X Don't use this
await tKey.generateNewShare(); // <-- Rather use this
``` -->
## Import the webStorage module ( Device Module - any Share B)
```jsx!
await tKey.modules.webStorage.inputShareFromWebStorage();
```
## Reconstruct the tKey
```jsx!
const reconstructedKey = await tKey.reconstructKey();
console.log('tkey: ' + reconstructedKey.privKey.toString('hex'));
```
## Generate a New Share B/C
And for new logins, one can input the Share B/C and recontruct the tKey.
Create a Share C, assuming you're login and have 2 shares.
```jsx!
await tKey.modules.securityQuestions.generateNewShareWithSecurityQuestions('QWERTY@123','whats your password?',);
```
## Relogin can be done with any share from Share B or C
```jsx!
await tKey.modules.securityQuestions.inputShareFromSecurityQuestions('QWERTY@123');
```
Reconstruct the tKey
```jsx!
await tKey.reconstructKey();
```