-
Notifications
You must be signed in to change notification settings - Fork 72
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
Reference Auth #2118
Reference Auth #2118
Conversation
packages/backend-auth/src/index.ts
Outdated
// ReferenceAuthConstruct is intentionally not public, but props are required | ||
export { ReferenceAuthProps } from './reference_construct.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this comment.
I'd move the type to reference_factory.ts
.
To underscore that its primary purpose is to type the input to referenceAuth
.
It can then be then used in construct as well.
If this happen to created import cycle then right place might be types.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, moved to reference_factory to make it more clear
// This executes within the custom resource lambda and errors get handled by the provider framework | ||
/* eslint-disable amplify-backend-rules/prefer-amplify-errors */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Lambda runtime sources we'd rather create local .eslintrc.json
in lambda
directory and put suppression there.
See example here https://github.com/aws-amplify/amplify-backend/blob/main/packages/backend/src/engine/branch-linker/lambda/.eslintrc.json .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
* chore: add working setup for e2e resources in ref auth * feed pr base sha and ref into envs before scripts (#2168) * feed pr base sha and ref into envs before scripts * removing empty file * chore: update names to use test prefix * chore: remove extra hyphen * chore: fix cleanup and add sandbox test * chore: make sure to throw if error describing stack is unknown --------- Co-authored-by: Roshane Pascual <[email protected]>
packages/integration-tests/src/test-projects/reference-auth/amplify/backend.ts
Fixed
Show fixed
Hide fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please address codeql.
Problem
Replaces PR (#2076)
Summary:
#1548
This adds support for referencing existing auth resources, while supporting the same behaviors that defineAuth allows.
You can use existing UserPool, IdentityPool, roles, and groups.
Data/Storage/Function resources do not require any changes or customization to work with reference auth.
Example fully featured backend, with groups, data, storage, and function handler.
Issue number, if available:
Changes
Corresponding docs PR, if applicable:
Validation
Checklist
run-e2e
label set.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.