amaury1093/login-with-metamask
소개
"블록체인으로 원클릭 로그인: MetaMask 튜토리얼" 데모 프로젝트
학습 및 교육측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalLogin with MetaMask
This demo is published as part of the corresponding blog article: "One-Click Login with Blockchain: a MetaMask Tutorial".
❗Important note. The article was written in March 2018, and in between, MetaMask introduced a breaking change. The codebase has since then been updated to support the breaking change. As such, the snippets in the article might not be exactly the same as the updated code today. The login flow however is still exactly the same. If you want to see the original code, please visit the
originalbranch.
Live Demo: https://amaury1093.github.io/login-with-metamask/

Getting Started
There are 2 packages in this repo: a backend which is a REST API written in Express, and a frontend which is a React single-page application. It's really a demo, so I tried to use as few libraries as possible, and the most popular ones when possible.
The simplest way to get started is to launch the demo using Docker Compose. Alternatively you could launch docker the containers manually, or run the node services using yarn.
1. Launch the demo using Docker Compose:
docker-compose up -d
This will setup the bakcend listening on localhost:8000 and the frontend on localhost:3000.
2. Launching the demo using Docker:
Build and launch the backend:
cd backend
docker build -t login-backend .
docker run -d -p 8000:8000 login-backend
Build and launch the frontend:
cd frontend
docker build -t login-frontend .
docker run -d -p 3000:3000 login-frontend
You can then access the frontend app on localhost:3000.
3. Start the demo using Yarn:
From the root folder of this repo, run
yarn install # Install root dependencies (for TS & linting in your IDE)
cd packages/backend && yarn install # Install backend packages
cd ../frontend && yarn install # Install frontend packages
cd ../.. # Go back to root folder
yarn start # Will launch the frontend and the backend at the same time
The backend should be running on localhost:8000, and the frontend on localhost:3000.
Alternatively, you can start the frontend and the backend separately:
# Start the backend
cd packages/backend
yarn start
# Start the frontend
cd packages/frontend
yarn start
Tests
Since this project is a demo, I haven't written any tests for it. Only code linting is performed, via eslint and prettier, which you can run using yarn lint.
Credits
If you liked this demo, I appreciate donations. My Ethereum address is 0x0b664ebF14E204CdE96690461830e0DD5dFb22aA.
This demo is published as part of the corresponding blog article at https://www.toptal.com/ethereum/one-click-login-flows-a-metamask-tutorial.
관련 프로젝트 살펴보기
불러오는 중…