The aim of this project is to work on web authentication module with all the major components integrated:
- Register and login through the database (currently this is
PostgreSQL) with full encryption; - Register/Login through
OAuth2(e.g. social networks - currently Facebook, Google and GitHub are supported); - Persistent login (currently this works for the standard login);
- Password recovery (not yet implemented).
To test and/or further develop all functionalities, you would need:
PostgreSQLinstalled, the password stored in environment variablePGSQLand a table namedusers(with columnsusername,email,passwordof typetext) in a database calledmydb. You’d also need to adjust the configuration ofdb.goindbAuthif your username is notpostgresand port not5432;- Applications created on Google, Facebook and GitHub with environment
variables declared in
socialAuthsub-module of the project (such asGOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRETetc.).
My personal goal with this project is to learn Go by doing. As such,
the project is very likely prone to bugs, and will be continuously
updated.
The final goal is to make a library, however in its current state the project is far from that.
It also relies heavily on other publicly available resources:
- Login page comes from this pen;
- Frontend landing page is a small adjustment of a well-known preloader;
- Standard login backend procedures follow the code & methods described here and here;
- Facebook and Google authentication follow the code from this article on Medium;
- GitHub authentication relies heavily on this implementation of GitHub authentication in the context of online forum development.
