Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet auth #55

Merged
merged 31 commits into from
Jun 29, 2023
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c62db9f
WIP: server-side generated challenge
valiafetisov Jun 20, 2023
26a8e7c
fix max-len eslint rule
valiafetisov Jun 20, 2023
e7aec95
working resolvers (:
valiafetisov Jun 20, 2023
ae03db2
add Authentication section to the API readme
valiafetisov Jun 21, 2023
529f0a8
Challenge cleanup
valiafetisov Jun 21, 2023
fdbeed6
end-to-end api auth flow
valiafetisov Jun 21, 2023
7641457
update readme
valiafetisov Jun 21, 2023
d56b8f9
fix linter and add some logging
valiafetisov Jun 21, 2023
2bb6d66
frontend: replace signIn and signUp mutatons with createChallenge and…
valiafetisov Jun 26, 2023
f754939
frontend: sign in working with metamask
valiafetisov Jun 26, 2023
a42ec5e
frontend: add user address to the header
valiafetisov Jun 26, 2023
ea0a936
replace deprecated substr
valiafetisov Jun 26, 2023
23a4374
add icon to the button
valiafetisov Jun 26, 2023
5272ab9
always refetch me
valiafetisov Jun 26, 2023
598ce1b
WIP: half-fixed tests
valiafetisov Jun 27, 2023
002f13d
challange module 100% coverage
valiafetisov Jun 27, 2023
fc97e32
WIP: all tests are fixed, coverage fails
valiafetisov Jun 27, 2023
2c463d5
100% test coverage for models
valiafetisov Jun 27, 2023
a281433
refactor src/helpers into relevant module
valiafetisov Jun 27, 2023
ffc6ed1
fix types
valiafetisov Jun 27, 2023
865aad5
add more tests
valiafetisov Jun 27, 2023
3d3b48e
remove requirement of rpc url
valiafetisov Jun 27, 2023
5704fa6
update readme
valiafetisov Jun 27, 2023
88d2208
update readme + small improvements
valiafetisov Jun 27, 2023
e333af3
better user type
valiafetisov Jun 27, 2023
306e24c
typos
valiafetisov Jun 28, 2023
f0f6535
use matching ethers version on frontend
valiafetisov Jun 28, 2023
f48a24f
fixed types and typos
valiafetisov Jun 28, 2023
234bfe0
fix docker-compose
valiafetisov Jun 28, 2023
5d07ba0
frontend: throw correct error message if no extension is present
valiafetisov Jun 29, 2023
6393e72
update application screenshot
valiafetisov Jun 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix docker-compose
  • Loading branch information
valiafetisov committed Jun 28, 2023
commit 234bfe07a31da92862fe268657b0b3c434311b70
2 changes: 1 addition & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ COPY . .

# Run in production mode
ENV NODE_ENV=production
RUN sed --in-place 's/sqlite/postgresql/g' ./prisma/schema.prisma
RUN sed --in-place 's/sqlite/postgresql/g' ./prisma/schema.prisma

# initialize db and start the app
CMD npx prisma db push && npm run start
2 changes: 1 addition & 1 deletion api/src/app.ts
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ export const createApp = (): Express => {
app.get(
'/',
expressPlayground({
endpoint: '/api/graphql',
endpoint: '/backend/graphql',
settings: {
'editor.theme': 'light',
'request.credentials': 'include',
16 changes: 14 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -18,19 +18,31 @@ services:
timeout: 5s
retries: 5

db_migrations:
build:
context: ./api
command: "npx --yes prisma db push --accept-data-loss"
environment:
DATABASE_URL: "postgresql://postgres:postgres@database:5432/postgres?sslmode=disable&connect_timeout=30"
depends_on:
database:
condition: service_healthy

api:
restart: unless-stopped
expose:
- 3000
build:
context: ./api
environment:
DATABASE_URL: postgres://postgres:postgres@database:5432/postgres?sslmode=disable
DATABASE_URL: "postgres://postgres:postgres@database:5432/postgres?sslmode=disable&connect_timeout=30"
API_ORIGIN: http://localhost
AUTH_SIGNUP_ENABLED: "1"
JWT_SECRET: replace_in_production_with_actual_secret
JWT_EXPIRATION_PERIOD_SECONDS: 3600
depends_on:
- database
database:
condition: service_healthy

frontend:
restart: unless-stopped