Skip to content

Commit

Permalink
Revert "add button google login"
Browse files Browse the repository at this point in the history
This reverts commit 278e6b0.
  • Loading branch information
tanguyenvn committed Aug 14, 2023
1 parent 59faca9 commit f97b93d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions examples/vue-app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<option value="beta">Beta</option>
</select>
</div>
<button class="custom-btn cursor-pointer block md-bottom-gutter" @click="login(true, 'google')">Login with Google</button>
<button class="custom-btn cursor-pointer block md-bottom-gutter" @click="login(true)">Login</button>
<button class="custom-btn cursor-pointer block md-bottom-gutter" @click="login(false)">Login without whitelabel</button>
<h6 class="or">or</h6>
Expand Down Expand Up @@ -239,7 +238,10 @@ export default defineComponent({
};
},
mounted() {
const torus = new Torus();
const torus = new Torus({
apiKey: "torus-default",
buttonPosition: "bottom-left",
});
web3Obj.torus = torus;
},
methods: {
Expand Down Expand Up @@ -308,7 +310,7 @@ export default defineComponent({
console.error(error, "caught in vue-app");
}
},
async login(useWhitelabel: boolean, verifier?: string) {
async login(useWhitelabel: boolean) {
try {
const { torus, web3 } = web3Obj;
(window as any).torus = torus;
Expand Down Expand Up @@ -336,7 +338,7 @@ export default defineComponent({
mfaLevel: "optional",
useWalletConnect: true,
});
await torus?.login({ verifier }); // await torus.ethereum.enable()
await torus?.login(); // await torus.ethereum.enable()
web3Obj.setweb3(torus?.provider);
torus?.provider.on("chainChanged", (resp) => {
console.log(resp, "chainchanged");
Expand Down

0 comments on commit f97b93d

Please sign in to comment.