Skip to content

nikitunkun/GoJsPhoneAuth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phone Auth

Simple Phone Authorization using GoLang and JavaScript


Technologies

  • GoLang
  • HTML CSS
  • JavaScript

Preview

  • Home Screen

  • Choose county for the phone mask

  • Enter phone number. It's automaticly formatted with to the phone mask
  • Existing Phone Number (the name is taken from API, in the example it is Nikita)

  • Invalid Phone Number (the error is also taken from API)


Using and Installation

Instalation

  • Clone or download this GitHub repository
git clone url
  • Navigate to the project folder
cd GoJsPhoneAuth

Run BackEnd

  • Navigate to the backend directory
cd backend
  • Build GoLang Project (it is simple using Makefile)
make build
  • Run the builded project file apiserver in backend directory

Run FrontEnd

  • Navigate to the frontend directory
cd frontend
  • Open the file index.html in your browser

Backend Endpoints

  • To create a new user (POST method)
http://0.0.0.0:8000/user
Params: {
    "name": "Example",
    "phone": "+123456789",
}
  • To get the user by phone number (GET method)
http://0.0.0.0:8000/user/{phone}
  • To delete user by phone number (DELETE method)
http://0.0.0.0:8000/user/{phone}

Have Fun 🙃

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published