-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
EventsRelated to AppSync EventsRelated to AppSync EventsbugSomething isn't workingSomething isn't workingexternal-contributor
Description
Before opening, please confirm:
- I have searched for duplicate or closed issues and discussions.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
JavaScript Framework
Angular
Amplify APIs
GraphQL API
Amplify Version
v6
Amplify Categories
auth
Backend
CDK
Environment information
sh: envinfo: command not found
Describe the bug
There's a bug related to authentication and overriding authentication per auth methods. Bug has been narrowed to lack of applying options from events.connect
and events.subscribe
methods (
const providerOptions = configure(); |
From code perspective
await events.connect(this.channelId, {
authMode: 'lambda',
authToken: 'asdad3s',
});
The authToken
is not included in configuring connection which results in No auth token specified
error being thrown.
Similar issues (which describes problem in more details):
- AWS Amplify (Events API): Unable to pass authToken with lambda authModeย #14124
- Appsync Events: Can't pass authToken while using authMode: "lambda"ย #14062
Expected behavior
The authToken
can be used with calls to events.connect
and events.subscribe
Reproduction steps
- Install Amplify and create sample project
- Configure amplify
- Execute following code
await events.connect(this.channelId, {
authMode: 'lambda',
authToken: 'asdad3s',
});
Code Snippet
await events.connect(this.channelId, {
authMode: 'lambda',
authToken: 'asdad3s',
});
Log output
// Put your logs below this line
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
madhavInnoloft
Metadata
Metadata
Assignees
Labels
EventsRelated to AppSync EventsRelated to AppSync EventsbugSomething isn't workingSomething isn't workingexternal-contributor