Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(api-rest): add rest default auth mode #14525

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

Open
soberm wants to merge 4 commits into main
base: main
Choose a base branch
Loading
from feat/rest-auth-mode
Open

Conversation

Copy link
Contributor

@soberm soberm commented Aug 26, 2025
edited
Loading

Description of changes

Adds support for the defaultAuthMode parameter in REST API operations, allowing
users to control the default authentication behavior. More specifically:

• Added defaultAuthMode?: RESTAuthMode to REST API method options
• Added RESTAuthMode type definition ('none' | 'iam')
• Updated REST client to handle authentication mode

• Added global configuration support via libraryOptions.API.REST.defaultAuthMode
• Added parameter passing from public API through to REST calls
• Added validation for defaultAuthMode parameter handling
• Updated tests for new functionality

Usage

Per-request configuration:

await get({
 apiName: 'myApi', 
 path: '/public-endpoint',
 options: {
 defaultAuthMode: 'none' // Skip default IAM authentication for this request
 }
});

Global configuration:

Amplify.configure({
 // ... other config
}, {
 API: {
 REST: {
 defaultAuthMode: 'none' // Default mode for all REST calls
 }
 }
});

Issue #, if available

#14460

Description of how you validated changes

Unit tests

Checklist

  • PR description included
  • yarn test passes
  • Unit Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

Checklist for repo maintainers

  • Verify E2E tests for existing workflows are working as expected or add E2E tests for newly added workflows
  • New source file paths included in this PR have been added to CODEOWNERS, if appropriate

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@soberm soberm marked this pull request as ready for review August 26, 2025 14:47
@soberm soberm requested a review from a team as a code owner August 26, 2025 14:47
@soberm soberm changed the title (削除) feat: add rest auth mode (削除ここまで) (追記) feat: add rest auth fallback (追記ここまで) Aug 28, 2025
@soberm soberm changed the title (削除) feat: add rest auth fallback (削除ここまで) (追記) feat: add rest default auth mode (追記ここまで) Sep 3, 2025
@soberm soberm changed the title (削除) feat: add rest default auth mode (削除ここまで) (追記) feat(api-rest): add rest default auth mode (追記ここまで) Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pranavosu pranavosu Awaiting requested review from pranavosu pranavosu is a code owner

@Amplifiyer Amplifiyer Awaiting requested review from Amplifiyer

@avi-karthik avi-karthik Awaiting requested review from avi-karthik avi-karthik is a code owner

At least 2 approving reviews are required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /