Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention that you cannot use onTelegramAuth as a callback name #6

Open
dlbas opened this issue May 28, 2019 · 0 comments
Open

Mention that you cannot use onTelegramAuth as a callback name #6

dlbas opened this issue May 28, 2019 · 0 comments

Comments

@dlbas
Copy link

dlbas commented May 28, 2019

  • vue-telegram-login version: 2.1.0
  • node version: 10.15.3
  • npm (or yarn) version: 6.9.0

Relevant code or config

<template>
  
  <!-- Callback mode -->
  <vue-telegram-login 
    mode="callback"
    telegram-login="YourTelegramBot"
    @callback="onTelegramAuth" />

</template>

<script>
import {vueTelegramLogin} from 'vue-telegram-login'

export default {
  name: 'your-component',
  components: {vueTelegramLogin},
  methods: {
    onTelegramAuth (user) {
      console.log(user)
    }
  }
}
</script>

What you did:

I named my callback function as I mentioned.

What happened:

That caused a nasty error, something like Object(...) is not a function.

Problem description:

I found that the problem happens when you name your callback function same as you do here.

I had to name my callback function differently.

Suggested solution:

Make an explicit warning to not to do so.

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

No branches or pull requests

1 participant