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:
PostgreSQL
installed, the password stored in environment variablePGSQL
and a table namedusers
(with columnsusername
,email
,password
of typetext
) in a database calledmydb
. You’d also need to adjust the configuration ofdb.go
indbAuth
if your username is notpostgres
and port not5432
;- Applications created on Google, Facebook and GitHub with environment
variables declared in
socialAuth
sub-module of the project (such asGOOGLE_CLIENT_ID
,GOOGLE_CLIENT_SECRET
etc.).
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.