Comments (4)
Oh my god - they've migrated back to map[string]string
from map[string]*string
. I literally just updated the package to better support the pointer maps 😭
I think what's happening in your case is in the conversion from map[string]string
to map[string]*string
you're referencing a loop scoped variable that has its value changed every iteration:
for k, v := range resp.ChallengeParameters {
chp[k] = &v
}
should be:
for k, v := range resp.ChallengeParameters {
scopedV := v
chp[k] = &scopedV
}
The easiest fix will be to use v2
of this repo, as that uses map[string]string
throughout. In your above example just replace github.com/alexrudd/cognito-srp/v3
with github.com/alexrudd/cognito-srp/v2
.
I'll release a new version at the weekend so we're back to map[string]string
from cognito-srp.
BTW thanks for the work you do! All the AWS API is so frustrating, and you're trying to make it better to work with ❤️
from cognito-srp.
Thanks alex! So shame I've fallen into this common mistake with iterations.
BTW dont clue a single reason for them to use string pointers instead of strings. Thanks for help again.
from cognito-srp.
Got a chance to fix this. Released v4.0.0
which can be imported using cognitosrp "github.com/alexrudd/cognito-srp/v4"
Thanks for opening the issue :)
from cognito-srp.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cognito-srp.