Skip to content

feat: add torus auth method#161

Merged
lnbc1QWFyb24 merged 6 commits into
thirdweb-dev:developfrom
vasa-develop:develop
Jan 27, 2020
Merged

feat: add torus auth method#161
lnbc1QWFyb24 merged 6 commits into
thirdweb-dev:developfrom
vasa-develop:develop

Conversation

@vasa-develop
Copy link
Copy Markdown
Contributor

@vasa-develop vasa-develop commented Dec 21, 2019

Added Torus as a default auth method for mobile and desktop browsers.
This enables a user to log in with their Google, Facebook, Twitch, Reddit or Discord account via bnc-onboard widget.

Here is an awesome preview:
bnc-onboard-torusonline-video-cu

License: MIT
Signed-off-by: Vaibhav Saini vasa@dappkit.io

License: MIT
Signed-off-by: Vaibhav Saini <vasa@towardsblockchain.com>
@vasa-develop
Copy link
Copy Markdown
Contributor Author

You may need to tweak the get() method of the balance part.
Right now, the decimal point is not in the right place.

@YZhenY
Copy link
Copy Markdown

YZhenY commented Jan 2, 2020

Hi there @aaronbarnardsound. Would love to get this merged in, got several dapps keen on using blocknative with us in the pipeline. Let me know what we can do to help!

@vasa-develop Thanks for the PR, appreciate it

@cmeisl
Copy link
Copy Markdown
Contributor

cmeisl commented Jan 2, 2020

Thank you @vasa-develop for the PR. @YZhenY we are taking a look and expect to merge early next week. (We're a little slower last and this week due to holiday schedules).

@lnbc1QWFyb24
Copy link
Copy Markdown
Contributor

@vasa-develop @YZhenY I will be checking this out today, will keep you updated.

@lnbc1QWFyb24
Copy link
Copy Markdown
Contributor

@vasa-develop The Torus implementation is looking pretty good. I took the opportunity to refactor some of the interfaces to allow more flexibility when adding wallets as it was needed in this PR for it all to work nicely. I sorted out the balance issue and added some validation.

@YZhenY There is one problem I am having with Torus, when the logout function is called on the Torus instance, it throws an error: User has not logged in yet even though this is called after logging in successfully. Could you look in to that issue on your end as that will need to be resolved before we can merge this PR.

@lnbc1QWFyb24
Copy link
Copy Markdown
Contributor

@YZhenY Have you had a chance to have a look at the logout issued mentioned above?

@YZhenY
Copy link
Copy Markdown

YZhenY commented Jan 21, 2020

@aaronbarnardsound been swamped with our recent release. will find time take a look at this today

@YZhenY
Copy link
Copy Markdown

YZhenY commented Jan 21, 2020

@iamonuwa could you look into this

@iamonuwa
Copy link
Copy Markdown

Right away. Thanks

Comment thread src/modules/select/wallets/torus.ts Outdated
let result = await instance.login({ verifier: loginMethod })
return { message: result[0] }
},
disconnect: () => instance.logout(),
Copy link
Copy Markdown

@iamonuwa iamonuwa Jan 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaronbarnardsound use await instance.cleanUp()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet will try that now. Thanks!

@lnbc1QWFyb24 lnbc1QWFyb24 merged commit f7d9fad into thirdweb-dev:develop Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants