here is the demo url
- Searching books by ISBN number (10 digit or 13 digit)
- Authorization/Registration (Social login with Gmail and Facebook is supported)
- Forgot password feature
- Storing encrypted passwords
When user tries to search for specific book, system first checks if such book exists in DB, if not, it uses public Google Book API service to fetch book metadata and saves it in DB, so next time it won't have to query API for same book
- ISBN number is validated in both frontend and backend
- ISBN validation is divided into two parts:
- Validating common pattern with RegEx
- Check Digit validation
- When recovering password, link is instantly given to user on the page and email is not sent
- run
docker-compose up
- activate
virtualenv
- run
pip install -r requirements.txt
- run
python manage.py migrate
- run
python manage.py runserver
- Go to Google console
- Pick a project or create new one and get into it
- Go to
Credentials
section from left-hand side - Create new
API key
- Copy that
API key
and paste it in .env file with key:BOOK_API_TOKEN
e.i (BOOK_API_TOKEN=<YOUR_TOKEN>)
- Go to facebook developers page
- Go to
My Apps
and pick an app or create new one and get into it - Go to
Settings > basic
and configureApp Domains
(This must include your app's domain. if developing locally, addlocalhost
) and at the bottom pressAdd platform
, chooseWebsite
and addSite URL
, such ashttp://localhost:8000
- Then configure
Redirect URLs
fromFacebook Login > Settings
page (This step is not mandatory if developing locally, e.i usinglocalhost
as a domain) - Copy
App ID
andApp Secret
fromSettings > Basic
page and paste them in .env file with keys:SOCIAL_AUTH_FACEBOOK_KEY
andSOCIAL_AUTH_FACEBOOK_SECRET
- Go to Google console
- Pick a project or create new one and get into it
- Go to
Credentials
section from left-hand side - Create
OAuth Client ID
by pressing+ CREATE CREDENTIALS
at the top and selectingOAuth Client ID
- When creating
OAuth Client ID
- Add your app url under
Authorized JavaScript origins
, such ashttp://localhost:8000
- Add redirect url under
Authorized redirect URIs
. Redirect url must have such pattern:${APP_URL}/accounts/google/login/callback/
, for example:http://localhost:8000/accounts/google/login/callback/
- Add your app url under
- After creating
OAuth Client ID
grabClient ID
andClient secret
and save somewhere, we'll need them for next step - Go to your app's admin panel, choose
Social applications
table, and add a record- In the
Provider
field, chooseGoogle
- In the
Client id
field, pasteClient ID
you have copied - In the
Secret key
field, pasteClient secret
you have copied and press save
- In the