Hacker News new | past | comments | ask | show | jobs | submit login

How would one add Authentication / Database support?

You obviously have the router for the front-end, but with Echo, how would one add authentication support, or should I just look at a different stack such as Django or Ruby on Rails with multiple auth / ORM middleware and use Go as a back-end?




You can easily add authentication to Go via JWT [0]. You can also write middlewares in Go[1] ranging from auth to gzip or anything else you can think of.

[0] https://github.com/dgrijalva/jwt-go

[1] https://hackernoon.com/simple-http-middleware-with-go-79a4ad...


Exactly!

Notes which I mentioned in another comment uses JWT https://github.com/wallix/notes and features a minimal auth/login API and client. Just a bit of warning: Passwords are not securely stored (in cleartext) on purpose, since the goal is to then use our (open source) SDK to encrypt passwords and other data.


The downvotes on this are disappointing. This may not be the way to build an application, but the question itself is reasonable and in good faith. I'd like to see fewer downvotes and more helpful explanations why only one backend is necessary.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: