Conversation
You got some rules wrong. There are no such things as
import { newNodeApp } from 'libmodulor/node';
import { newReactApp } from 'libmodulor/react';
import { newNextjsApp } from 'libmodulor/nextjs';
Plus, util files should be kebab-case, not camelCase.
Let's add a new use case to the Auth app. We'll add a sign up use case with email and password. Check the existing SignIn use case to implement it.
You need to persist the use case. Check examples/apps/Spotify/src/ucds/CreateAlbumServerMain.ts as an example to see how to do so <interrupt> Do not change SignUpOPI0. Only return jwt. Also you need to persist before assigning auth so you can update auth.user.id with the aggregateId
Now remove the usage of the default roles, remove the role input field and set the role to "regular" by default when a user signs up.
Do not use FAKE_USER_REGULAR anymore. Build a proper UCAuth. For the organizationId, generate one using CryptoManager. For the firstname, capitalize the first part of the email address (before arobase) THIS IS A NIGHTMARE. LOOKS LIKE SOMEONE WHO LIED ON THEIR RESUME, TRYING TO SOLVE A SIMPLE PROBLEM DURING AN INTERVIEW.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.