Show HN: CampTarget, road routing and planning helper
camptarget.com
camptarget.com
It's using Google Maps JavaScript API, some minimal JavaScript on front-end part, and Node + Mongo on backend.
It still has bugs and a lot of things to do, so this would be a beta-preview :).
I would be very happy if you could provide some feedback here :-)
However, to me, the real blocker was when I clicked login with Google, it says it was going to provide my age range. Why? What do you want to do with that?
We use two methods provided by Passportjs (plus.login and userinfo.email).
I guess one of these asks for age range. You can check their documentation for more details at http://www.passportjs.org/docs/google/.
And for the transparency sake, these are the parts of code on our side.
router.get('/callback', passportGoogle.authenticate('google', { failureRedirect: '/' }), (req, res, next) => { let user = req.user.doc; let userId = user.userid;
///
res.cookie('token', userId, { ...
and this is what is saved to Mongo DB:var UserSchema = new mongoose.Schema({ name: String, userid: String, email: String, sourcePlatform: String, updated_at: { type: Date, default: Date.now }, });
Hope that helps ;)
It looks like the age range is a component of the plus.login scope. You’re not storing any data associated with that scope, so you can instead use the userinfo.email scope (and, possibly, the userinfo.profile scope) to ask for only the information you need.
am i missing something? seems like a great oppty to offer some exciting and unexpected options.
i would love a tool like this if it filled in the blanks with destinations that were new, exciting, unique, etc.
I'd compare to CampTarget, but like many others the immediate need for my location and creds was an insta-close for me.