Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Aug 17 01:43
    @bjorno43 banned @linkin-park
  • Jun 20 21:20
    @bjorno43 banned @shenerd140
  • May 10 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 27 19:47
    @mstellaluna banned @zhonghuacx
  • Apr 25 17:12
    @mstellaluna banned @cmal
  • Jan 08 22:00
    @mstellaluna banned @dertiuss323
  • Dec 15 2018 23:36
    @mstellaluna banned @18835579411
  • Dec 13 2018 23:57
    @mstellaluna banned @brandon6190
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:13
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:58
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:15
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
Malcolm
@noinkling
I mean it makes sense for public APIs that you can access without an interface, but what about one that just serves a single-page app?
It's something I never understood.
Ka Lun Lee
@kalunlee136
@noinkling from my understanding, the benefit is for scaling. jwt are stateless and are sent with every request so the server doesnt need to keep track of it thus removing some stress on server . It just receives the payload (with the auth info) from the jwt, parses it, and accepts it if it matches. I remember reading something about jwt authentication working better with mobile too, but im not too sure about it. Aside from those things, i dont see much difference between session vs jwt
@noinkling i think this might make more sense to you: http://stackoverflow.com/questions/17000835/token-authentication-vs-cookies. it's about emberjs/rails, but the logic still applies.
DuckyDisciple
@DuckyDisciple
Is anyone familiar with HighStocks/HighCharts for making graphs?
sigursiguros
@sigursiguros
Hi guys, I'm trying to login to my github account, in the cloud9 development environment
git config --global user.username <USerNamE>
this code is returning an error message
"bash: syntax error near unexpected token `newline'"
will you be able to help?
Anders Bengtsson
@anders462
@Rafase282 I did my authentication for the Night coord app I am working on with JWT. I found it pretty straight forward compared with using the passport auth
Rafael J. Rodriguez
@Rafase282
so you prefer JWT over passport-http/local?
Anders Bengtsson
@anders462
@Rafase282 for sure, really straight forward I thought. I only done backend, but frontend should be really simple, store jwt in localstorage or in cookie, send it in header, body or url with requests to protected routes... header is prefered
Jon Lucas
@jonslucas
For the Image Search Abstraction, does anyone have any tips for setting up the image search functionality? I've been struggling with using the google custom search api for the last day or so. I can get it to respond with search result data, but I can't seem to figure out how to limit that to results from google images, which seems to be what the example project is doing. Perhaps I'm barking up the wrong tree?
Darryl Pargeter
@darrylpargeter
@jonslucas the best thing to do is ditch google and go with bing… yes bing, or imgur they have nice apis
Jon Lucas
@jonslucas
Hmmm, I'll have to look into that. It's a little disappointing that I can't seem to figure it out though. It seems rather simple, like I'm just missing a certain query param in my request. And I can't seem to find the right google search term to get to the answer I'm looking for.
Thanks @darrylpargeter
CamperBot
@camperbot
jonslucas sends brownie points to @darrylpargeter :sparkles: :thumbsup: :sparkles:
:star: 744 | @darrylpargeter | http://www.freecodecamp.com/darrylpargeter
Darryl Pargeter
@darrylpargeter
google search api was a bitch took me a long time to get it working, if you show me your code can try to help you (but coming form someone who used google api would say ditch it on the side of the road)
Jon Lucas
@jonslucas
here is the link to the pertinent function I'm using to call the api:
https://github.com/jonslucas/fcc-imgsearchabstraction/blob/master/app/controllers/imgSearch.server.js
but, I guess it's not too much trouble to just scrap it and start with the bing API
Anders Bengtsson
@anders462

@Rafase282 Flow:

  1. register user, save user with hashed password (I used bcrypt)
  2. login: compare hashed passwords and if ok, create JWT, (I used "jsonwebtoken" npm mod) send back in res to client
  3. client send JWT in req, >> I did a simple middleware mod, that checks the JWT validity before routing to the protected route!

To logout user, you can simple delete token on the client side, but there are a way to revoke the token from server as well.

  • Protect your secret string, I put in .env
  • When you create token, don't forget to mask password in user object as the token is not encrypted only encoded, anyone can easily read a token
Rafael J. Rodriguez
@Rafase282
@anders462 have you streamed before?
Anders Bengtsson
@anders462
nope. haven't
Darryl Pargeter
@darrylpargeter
@jonslucas would say thats the best think bing has a module for it to make life even easyer if you google it plus 5,000 calls a month is better then 100 a day
Anders Bengtsson
@anders462
@Rafase282 what do you use, I be happy to do it
Rafael J. Rodriguez
@Rafase282
OBS to stream. I'm trying to fill a gap, the streams are either bonfires or FCC bug fixes or Musare, so I'm tryign to add API Backend and related front end dev while working on my project because I doubt people will sit to watch me write articles for the wiki. But the idea was to show you my api and then we can come up with a decent way to provide security, so far mine works but I'm still a noob. @anders462
Jon Lucas
@jonslucas
@darrylpargeter Yeah, I don't really think that I'll be hitting either of those api limits, so that's rather a non issue for me. It's more that it's frustrating to get so close to finish line and to have to start over practically because of something that seems so trivial
Anders Bengtsson
@anders462
@Rafase282 I am a noob as well :-)
Rafael J. Rodriguez
@Rafase282
but you seem to have more experience, with a proper working implementation
Anders Bengtsson
@anders462
@Rafase282 well,,i am stubborn, but if its anything I can do to help, I be happy to. how do we pair (never done it)
Rafael J. Rodriguez
@Rafase282
skype and c9? or screenhero and c9?
Anders Bengtsson
@anders462
Skype haven't used c9 or screenhero
skypeid andben462
Rafael J. Rodriguez
@Rafase282
well the code is on c9 ;-)
Anders Bengtsson
@anders462
ok, let's see if I signed up, never used it though
sigursiguros
@sigursiguros
@sigursiguros
Hi guys, I'm trying to login to my github account, in the cloud9 development environment
git config --global user.username <USerNamE>
this code is returning an error message
"bash: syntax error near unexpected token `newline'"
will you be able to help?
Moisés Man
@moigithub
@sigursiguros and <USerNamE> is ur username ??
git config --global user.username sigursiguros
sigursiguros
@sigursiguros
Thanks @moigithub, I added the brackets <> and it wasn't working
CamperBot
@camperbot
sigursiguros sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
sigursiguros
@sigursiguros
appreciate it
CamperBot
@camperbot
:star: 658 | @moigithub | http://www.freecodecamp.com/moigithub
Onwu Gideon
@onwu
wat could be wrong guys
my login page works well on xampp
but when i take it online, it doesn't login again
eeseesee
@eeseesee
@jonslucas I can explain how to set up the google custom search api for the image search project if you are still around/interested
Rafael J. Rodriguez
@Rafase282

Currently streaming with @anders462 about API security at http://www.twitch.tv/freecodecamp

Jon Lucas
@jonslucas
@eeseesee I'm around. I did move on to the Bing API in my implementation, which was extremely simple to setup using something like the node-bing-api module
But, I am also interested in figuring out what I was missing in the cse api