-
Notifications
You must be signed in to change notification settings - Fork 100
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
There's no documentation on how to refresh/update the credentials. #460
Comments
with_credentials_provider hasn't gone anywhere as far as I know: https://github.com/awslabs/aws-crt-nodejs/blob/main/lib/browser/aws_iot.ts#L239 |
There should be no need to refresh the credentials if the sample pattern is followed. A recurrent task does it for you: |
Thanks for the quick response @bretambrose when I try to use I get: I'm on aws-iot-device-sdk-v2 version 1.19.0 and aws-sdk 2.1541.0. Any clue what could be going on? If I check the definition of |
Oh I figured out the issue. I forgot to set up the path in tsconfig.json. Sorry & thanks for the help. I highly recommend updating README with more details on browser usage. |
|
You're somehow ending up with the node source and not the browser source. If you're using typescript you can ok, you figured it out (https://github.com/aws/aws-iot-device-sdk-js-v2/blob/main/samples/browser/react_sample/tsconfig.json#L16) |
I agree, we should put a section in both aws-crt-nodejs and this repo as well. |
Hi. I'm using this library in a React project to have the ability to subscribe to events. I use the cognito identity method on the browser side to get credentials. It was very simple to do in v1 but now I'm trying to upgrade to v2. In v1 I could do
updateWebSocketCredentials
to update the credentials, but I can't find anything similar in v2.I've tried various methods in v2, such as using
new_with_websockets
that accepts options:But that doesn't seem to work.
Is there no method to update the credentials when they expire? I found one React example that uses something called
.with_credential_provider
that doesn't seem to exist any longer.aws-iot-device-sdk-js-v2/samples/browser/react_sample/src/PubSub.tsx
Line 85 in d81d499
Any help would be appreciated.
Links
aws-iot-device-sdk-js-v2/samples/browser/react_sample/src/PubSub.tsx
Line 85 in d81d499
The text was updated successfully, but these errors were encountered: