Git Product home page Git Product logo

authentication-server's Introduction

Platyplus

Low-code, offline-first apps with Hasura.

See platy.plus for further information.

authentication-server's People

Contributors

dependabot[bot] avatar l-david avatar plmercereau avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

authentication-server's Issues

Add 2FA support

Hi man,
I want to change this boilerplate login method to 2FA based login.
I see that you are using passport.js now and find this for passport.js:
http://www.passportjs.org/packages/passport-2fa-totp/

Can you guide me to implement this and add this feature to your boilerplate?

I need to implement 2FA based login with send 2FA code through a SMS webhook.

Use Apollo Client for data storage

Hey, thanks for this work!

I have a few questions:

  1. This auth service connects to the same DB as hasura and uses the same user table, correct?
  2. If the above is true, then how would one manage the migrations and metadata of hasura if knex is also doing the same?
  3. Would it make sense to create all the models this service uses in Hasura and use apollo client to access them using gql using the HASURA_GRAPHQL_ADMIN_SECRET?

400 Bad Request on first call

Often the first call to the server (after a period of at least 15 minutes) is met with a 400 Bad request despite having correct credentials.

The second time the call is made (exactly the same headers), the call succeeds and the server responds correctly.

Add "RUN_DEFAULT_MIGRATION" environment variable in Dockerfile

@plmercereau I'm try to some modification and add this to my docker-compose file like below:

version: '3.6'
services:
  postgres:
    image: postgres
    restart: always
    volumes:
    - ./db_data:/var/lib/postgresql/data
  pgadmin:
    image: dpage/pgadmin4
    restart: always
    depends_on:
    - postgres
    ports:
    - 5050:80
    ## you can change pgAdmin default username/password with below environment variables
    environment:
      PGADMIN_DEFAULT_EMAIL: [email protected]
      PGADMIN_DEFAULT_PASSWORD: admin
    volumes:
    - ./pgadmin_files:/var/lib/pgadmin
  graphql-engine:
    image: hasura/graphql-engine:v1.0.0-alpha38
    ports:
    - "8080:8080"
    depends_on:
    - "postgres"
    restart: always
    environment:
      HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:@postgres:5432/postgres
      HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
      ## uncomment next line to set an access key
      HASURA_GRAPHQL_ADMIN_SECRET: admin
      HASURA_GRAPHQL_JWT_SECRET: '{"type":"RS256", "key":"<public key>"}'
  authentication:
    build:
      context: ../../authenticationServer/
      dockerfile: Dockerfile
    restart: always
    depends_on:
    - "postgres"
    ports:
    - "6060:8080"
    environment:
      NODE_ENV: production
      DATABASE_URL: postgres://postgres:@postgres:5432/postgres
      AUTH_PRIVATE_KEY: "<private key>"
      AUTH_PUBLIC_KEY: "<public key>"

but it seems that knex not running migration to create tables.
I think it's better to have a environment variable for example called RUN_DEFAULT_MIGRATION and if we set it to true we run migration in Dockerfile.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.