Code Monkey home page Code Monkey logo

rocket-auth-aws-infrastructure's People

Contributors

charlietfe avatar claytonfarr avatar juanjoman avatar moneyba avatar otoumas avatar semantic-release-bot avatar

Watchers

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

rocket-auth-aws-infrastructure's Issues

Add event to event store on sign-up

Feature Request

onSignUpEvent when a new user signs up in the application.

Description

Create an event and an entity in the event store when a new user signs up. This entity will register the user with relevant data so that it is not necessary to create it using a command after the sign-up.

Possible Solution

Create the event in the event-store DynamoDB table as the last step in the signup process. Look how it is done in the kafka consumer or the storage rockets. The event could look like:

@Event
export class UserInfoCreated {
  public constructor(
    public id: string,
    readonly email: string,
    readonly phone: string,
    readonly role: AppRole,
    readonly isDeleted: boolean
  ) {}

Additional information

Unify acessToken and tokenId

Feature Request

Description

Currently, the user gets an accessToken (necessary to sign out) and an idToken (necessary to access restricted resources).
It would be great to unify both tokens, so the API would be cleaner and less confusing.

Add roles claim to the tokenVerifier object

Bug Report

In order to use the tokenVerifier object in the config, generated in the Auth rocket, in other rockets, the rolesClaim field need to be set as well as the issuer and the jwksUri

Current Behavior

Only issuer and the jwksUri are set in the tokenVerifier object

Expected behavior

rolesClaim is added as well to the tokenVerifier object

Possible Solution

PR

Additional information

Environment

  • Booster version: 0.16.2
  • Node/npm version: latest
  • OS: [e.g. OSX 10.13.4, Windows 10]

Missing AWS script to create users that don't require sign-up

Right now, if we decide to create a role without sign-up method, the user has to manually create the user with its role in AWS. The idea is to automate this so a user can run a script like ./createUser <user_pool_id> <user_email> <role> and the user sets up automatically. Leaving more info below:

This affect these kind of roles (no sign-up methods):

@Role({
  auth: {
    signUpMethods: [],
  },
})
export class Admin {}

To sign in, the user has to manually create a user:

  1. Go to AWS console (cognito)
  2. Create the user with a temporary password
  3. Run the following command to set a permanent password:
aws cognito-idp admin-set-user-password
  --user-pool-id <your-user-pool-id> \
  --username <username> \
  --password <password> \
  --permanent
  1. Run this other command to add the custom:role = Admin:
 aws cognito-idp admin-update-user-attributes \
    --user-pool-id <pool_id> \
    --username <username>  \
    --user-attributes Name="custom:role",Value="Admin"

Long lambda names give a 400 when deploying the application

Bug Report

Current Behavior

When the project name + lambda name is +64 characters, the deployment fails:
image

It's also happening for other lambdas, but this one is an example.

Possible Solution

We could shorten the lambda name.

Environment

  • Booster version: 0.20.0
  • Node/npm version: 16.2

Update Documentation

Documentation bug, improvement

Description

The tokenId is missing from the sign-in response and the refresh token response.

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.