Skip to content

Commit

Permalink
cleanup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0neerpat committed Feb 18, 2021
1 parent f2990be commit 83de364
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ const { logIn, logOut, getCurrentUser, client } = useAuth();

// Trigger authentication
await logIn("walletConnect");

// Access the ethers provider directly
await client.provider.getSigner();
```

If this is your first time using Redwood Auth, you should check out the official Redwood [auth docs](https://redwoodjs.com/docs/authentication)
Expand Down Expand Up @@ -231,25 +228,25 @@ const LoginPage = () => {
export default LoginPage;
```

## Wallet Connect support
## Wallet Connect

You must pass an optional `rpc` or `infuraId` to use Wallet Connect.

```
```js
ethereum = new EthereumAuthClient({
makeRequest,
// Note: you must set NODE_ENV manually when using Netlify
debug: process.NODE_ENV !== 'development',
infuraId: process.env.INFURA_ID,
})
debug: process.NODE_ENV !== "development",
infuraId: process.env.INFURA_ID
// For rpc see https://docs.walletconnect.org/quick-start/dapps/web3-provider#provider-options
});
```

Read more about using the [rpc provider](https://docs.walletconnect.org/quick-start/dapps/web3-provider#provider-options).

Then when you call `unlock()` pass the type "walletConnect".
Then pass the type "walletConnect" when you unlock

```js
const { logIn, logOut, getCurrentUser } = useAuth()

const onClickWalletConnect = async () => {
await logIn("walletConnect")
```
Expand Down Expand Up @@ -283,11 +280,12 @@ yarn build:watch
yarn rwt copy:watch ../redwood
```
## Planned features
## TODO
- Change default method to use `walletconnect`
- Export typescript types here for the user object, instead of declaring them inside `@redwoodjs/auth`
- Add support for `walletlink`
- [x] Add support for `walletconnect`
- [ ] Allow direct access to the ethers `provider` on the client.
- [ ] Export typescript types here for the user object, instead of declaring them inside `@redwoodjs/auth`
- [ ] Add support for `walletlink`
## Publishing
Expand Down

0 comments on commit 83de364

Please sign in to comment.