Giter Site home page Giter Site logo

Comments (6)

lefnire avatar lefnire commented on May 20, 2024

what do you mean?

from derby-auth.

Ziink avatar Ziink commented on May 20, 2024
    // Provide default values for options not passed in
    // TODO pass in as conf URL variable
    _.defaults(obj.conf, {callbackURL: "http://localhost:3000/auth/" + name + "/callback"})

The above lines are from index.js and it wasn't working for me because of localhost:3000 since I was trying with a domain name. So just using
_.defaults(obj.conf, {callbackURL: "/auth/" + name + "/callback"})
takes care of that for now.

from derby-auth.

lefnire avatar lefnire commented on May 20, 2024

I see. Unfortunately that doesn't work for the other 3 providers, it causes url redirect error. Any thoughts? Could just have user pass in domain as initialization options. Unfortunately determining domain programmatically has to be done in a middleware via req, which is too late after initialization of the Passport components.

from derby-auth.

lefnire avatar lefnire commented on May 20, 2024

You can currently get around all that by just passing in callbackURL option in your server/index.js per strategy (as per the twitter & github examples), but that's a pain

from derby-auth.

Ziink avatar Ziink commented on May 20, 2024

The derby-auth module already accepts the callbackURL in 'conf' from the app (example/src/server/index.coffee)

The default of

_.defaults(obj.conf, {callbackURL: "/auth/" + name + "/callback"})

already works for Facebook and Github. For Twitter I had to specify the callbackURL with the domain name in example/src/server/index.coffee, and that works.

from derby-auth.

moiseevigor avatar moiseevigor commented on May 20, 2024

Sorry guys I'm lost with callbacks. Cannot understand how to obtain the access token, I suppose it should be the kind of callback function which receives the token after successful authentication
https://github.com/jaredhanson/passport-instagram#usage

As you may see I'm working with instagram startegy and derby-auth and cannot come out. Any help is welcome!

from derby-auth.

Related Issues (20)

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.