Skip to content

Commit

Permalink
Correction (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Jian authored Mar 18, 2019
1 parent dd1a34c commit 96000cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion new-sdks/tpp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@token-io/tpp",
"version": "1.0.0-beta.5",
"version": "1.0.0-beta.6",
"description": "Token JavaScript TPP SDK",
"license": "ISC",
"author": {
Expand Down
4 changes: 2 additions & 2 deletions new-sdks/tpp/src/main/TokenClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export class TokenClient extends Core {
const tokenMember = await this._unauthenticatedClient.getTokenMember();
const params = {
tokenId: callback.tokenId,
state: JSON.parse(callback.state),
state: JSON.parse(decodeURIComponent(callback.state)),
signature: JSON.parse(callback.signature),
};

Expand All @@ -186,7 +186,7 @@ export class TokenClient extends Core {
const signingKey = Util.getSigningKey(tokenMember.keys, params.signature);
await this.Crypto.verifyJson(
{
state: encodeURIComponent(JSON.stringify(params.state)),
state: callback.state,
tokenId: params.tokenId,
},
params.signature.signature,
Expand Down

0 comments on commit 96000cd

Please sign in to comment.