Coder Social home page Coder Social logo

meteor-accounts-slack's Introduction

meteor-accounts-slack

A meteor package for Slack's login service.

Package Dependencies

  • accounts-base
  • accounts-oauth

Install

meteor add khamoud:accounts-slack

Allows for requesting credentials without creating a user as well.

// client
Slack.requestCredential({}, function(token) {
    var secret = OAuth._retrieveCredentialSecret(token);
    if(secret){
        Meteor.call("linkAdditionalSlack", token, secret,function(err,res){
            if(!err) {
                Router.go("/group/" + res.getUrlPath());
            } else {
                    console.log(err);
            }
        });
    }
});

//server
'linkAdditionalCalendar':function(token, secret){
    // Make sure the user is logged in
    var user = Meteor.user();
    if(!user){
        throw new Meteor.Error(500, "You are currently not logged in.")
    }

    // Retrieve the credential token.
    var cred = Google.retrieveCredential(token, secret);
    var serviceData = cred.serviceData;
}

meteor-accounts-slack's People

Contributors

krishamoud avatar

Watchers

 avatar  avatar  avatar

Forkers

emmerge

meteor-accounts-slack's Issues

query should be able to specify redirect uri

For installed clients like ios apps, the redirect comes back to the phone, and the call to the meteor server to exchange the code for a token is made explicitly. Slack requires the token exchange call to specify a redirect uri that has to match the original redirect uri used for obtaining the code. Thus, the installed clients need to be able to pass a redirect uri into the accounts-slack getAccessToken() method that can override the default.

Uncaught TypeError: OAuth._loginStyle is not a function

Hey!

I am trying to use your meteor-accounts-slack package, but when using it I am getting the following error in my javascript console:
Uncaught TypeError: OAuth._loginStyle is not a function
Any idea why this might be?

Thanks!

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.