Giter Site home page Giter Site logo

authentication-node-sample's People

Contributors

mauerbac 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

authentication-node-sample's Issues

no longer working

This does not seem to be working any longer.

When I click on the broken image link I get this response

{"status":400,"message":"invalid client"}

Is there a youtube video demonstrating this code?

Recommend removing the deprecated "request" package in favor of "node-fetch"

As of February the package "request" has been deprecated and will no longer be supported.

I would recommend switching to "node-fetch" which is more likely to be maintained and is, ultimately, a cleaner method for making the request.

const fetch = require('node-fetch');

fetch('https://api.twitch.tv/helix/users', options)
    .then( response => response.json())
    .then( data => {
        // magic happens with the parsed response JSON 
        done(); 
    });

It may seem a little silly to create an issue on something intended to be a sample but deprecated packages are not returned in search results on npmjs.com which could make searching for documentation difficult for those adapting the sample.

Display Name, Bio and Image not showing.

Error when presenting data in HMTL.
Display Name, Bio and image is not showing.

HTML TEMPLATE:
var template = handlebars.compile(

<title>Twitch Auth Sample</title>
Access Token{{accessToken}}
Refresh Token{{refreshToken}}
Display Name{{display_name}}
Bio{{bio}}
Image{{logo}}
`);`

req.session.passport.user is returing:
{ data: [ { id: 'XXXXXX', login: 'XXXXXX', display_name: 'XXXXXXXXXX', type: '', broadcaster_type: '', description: "XXXXXXXXXX", profile_image_url: 'XXXXXXX', offline_image_url: 'XXXXXXX', view_count: XXXXX } ], accessToken: 'XXXXXX', refreshToken: 'XXXXXXX'' }
Here you see that data[0].XXXX is the correct place for display_name, description and profile_image.

Regards
Codekuu

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.