You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a look at it and as far as i can tell the only two things that are useful here are buildChallengeTx and readChallengeTx. buildChallengeTx() can be used to replace the fetchWebAuthChallenge() of satoshipay/stellar-sep-10 without any additional work but readChallengeTx() cannot.
The problem is that there is no counterpart for the fetchWebAuthData() function of satoshipay/stellar-sep-10 in the stellar-sdk.
So my suggestion would be to replace the fetchWebAuthChallenge() function by the stellar-sdk counterpart and leave everything else as is.
@ebma One important objection: You cannot replace fetchWebAuthChallenge() with buildChallengeTx() as the latter will create a random new challenge. Each challenge tx contains a random nonce and the client of course needs to sign the challenge that the server wants them to sign.
I see. Seems like what we could do is replace the assertChallengeOK() helper function with readChallengeTx() since they both validate the challenge transaction (see source code of readChallengeTxhere)
But that's probably just a tiny improvement. Do you think I should change it @andywer?
SEP-10 has just recently been updated and so have the SEP-10-related helper functions in the stellar-sdk: see here.
The main gotcha is that we're using our own custom package for SEP-10.
To Do
The text was updated successfully, but these errors were encountered: