Closed ggascoigne closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
amber-acus | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Jan 8, 2023 at 1:17AM (UTC) |
amberconnw | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Jan 8, 2023 at 1:17AM (UTC) |
LGTM. Tested locally with ACUS, existing and newly created user, and ACNW, existing user, and added a role.
Adding role requires signing out/signing in to re-resolve.
This removes the dependency of Auth0 on the aws database.
With this change, we can disable the Auth0 rule that adds the userId and Roles to the token, and instead add them to the session in the login callback.
This means that all resolution of users and roles uses the local db.
Other than that, there's a bit of refactoring and some readmes. I've started using the package prefix of @amber, I want to convert all of the packages to do this, but resisted the urge to do this here as it would explode the pr. I'll do it separately.
FYI the code in packages/api/src/apiAuthUtils.ts is basically the code from the previous auth0 rule, mildly tweaked to work in this environment. The logic remains the same, though the error checking is more robust.