Skip to content
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

Deep linking returns invalid access token #1329

Open
sitara-atlogys opened this issue Jul 6, 2022 · 0 comments
Open

Deep linking returns invalid access token #1329

sitara-atlogys opened this issue Jul 6, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@sitara-atlogys
Copy link

sitara-atlogys commented Jul 6, 2022

Describe the bug
Hello team.I have found an issue that access token received through deep link (Link wallet feature) is not working with https://wallet.api.helium.systems api calls. It returns 401 status. When i debug the code of this repo then i found there is a mismatch between order of parameters
https://github.com/helium/hotspot-app/blob/main/src/utils/secureAccount.ts#L136
and
https://github.com/helium/hotspot-app/blob/main/src/features/txnDelegatation/LinkWallet.tsx#L49

So we need to move the time property after address in the makeAppLinkAuthToken function call, to fix it.

The problem is the key pair do sign the token object as it is.
https://github.com/helium/hotspot-app/blob/main/src/utils/secureAccount.ts#L169

Expected behavior
Token received through deep link should work with https://wallet.api.helium.systems api calls.

Additional context
This is the token i received through deep link - eyJhZGRyZXNzIjoiMTNEdnFVb3FhOHJqYm5IejJUMmtSdG15eEhITkNXU0d3TTF5MmpQU1pWU0RtcDhDdkNGIiwidGltZSI6MTY1NjkzOTk3OSwic2lnbmF0dXJlIjoiS0NBdFhuRzhCVFVhV2JIYnZJTkQwZGVUZjM5TTFLcmpoWWdxYm42bk9zR2RSWnVwZG9vOFNWRXZkUG9NVTdRRUNMVlZPdlEwdUdKcE8yR1FSWjBpREE9PSJ9

This is the token created by my app itself

eyJhZGRyZXNzIjoiMTNEdnFVb3FhOHJqYm5IejJUMmtSdG15eEhITkNXU0d3TTF5MmpQU1pWU0RtcDhDdkNGIiwidGltZSI6MTY1NjkzOTI4Mywic2lnbmF0dXJlIjoiRjhNN0U0eFJHM2t3SGVaZGk5ay95bTV3VWE2NnNhaXJZVXZ3WFZ0azdFZy9TcDJGK0Jyc083eG5VUjVnU0xKVllSTVBrcXhqeEpmeWVYWlhvQldkRHc9PSJ9

@sitara-atlogys sitara-atlogys added the bug Something isn't working label Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant