Giter Club home page Giter Club logo

passport-telegram-strategy's People

Contributors

blitss avatar negezor avatar nodkz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

passport-telegram-strategy's Issues

[TypeScript] Importing the module

I have a problem importing the package in TypeScript, although both of these methods work and actually import the module but still, TypeScript yells at me "What are you doing".

First method:

import * as TelegramStrategy from 'passport-telegram-official';

// [ts] Module '".../node_modules/passport-telegram-official/dist/index"' resolves to a non-module entity and cannot be imported using this construct.

Second method:

import TelegramStrategy = require('passport-telegram-official');

// [ts] Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.

Seems like you're using export = TelegramStrategy which is kinda outdated. So if you use export default we can easily import it as default:

export default TelegramStrategy;

// later
import TelegramStrategy from 'passport-telegram-official';

Issue if running a second polling listener

I really appreciate this implementation of the official Telegram oAuth system. I am currently developing a new little service and immediately chose to use it.

In my tests, I discovered that if I am running a listener myself, the server process that's running the express site (and the passport auth) will be in conflict with it all.

I wonder how this can be worked with. Does the oAuth actually need the Telegram SDK? Does it have to run polling? Is there a way around this?

But also Webhooks might be problematic as I already use those with the second listening process. Seems like this is not going to be all too easy. I hope you can help ๐Ÿ’ช.

TypeError: TelegramStrategy is not a constructor

Hi, maybe I'm wrong, but I have issues getting the Telegram login to work.

I included it via
var TelegramStrategy = require('passport-telegram-official').Strategy;
and used later in the code
passport.use(new TelegramStrategy(
but I get the following error:

TypeError: TelegramStrategy is not a constructor

What am I doing wrong?
Thank you for your help!

Here is my code:
https://github.com/BitDesert/MyNanoNinja/blob/telegram-login/config/passport.js#L8
https://github.com/BitDesert/MyNanoNinja/blob/telegram-login/config/passport.js#L513

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.