genitrust / dashwallet-ios

github user QuantumExplorer's iOS dashwallet
Other
1 stars 0 forks source link

Existing Auth (with WOC password) will not have API device verified #17

Open rgenito opened 6 years ago

rgenito commented 6 years ago

When capturing holds, I see that the Auth's device will have verified=True. However, this is not the case with Device's owned by Auths who have the password property set.

Based on Andrew's response, here's what's going on:

What you need to do after you receive status 401 from POST /api/v1/holds/:

device-not-verified-select_device_to_change___django_site_admin

sujalBandhara commented 6 years ago

Hi @andrewosenenko I am not getting 401 with the number which is register from web with password. I am getting 201 response in POST /api/v1/holds/

Could you please Assist me to resolve this issue.

andrewosenenko commented 6 years ago

@sujalBandhara do u use auth token in X-Coins-Api-Token or device token? it seems, that u capture a hold with auth token(in this case there is no device in request obj), u should use token from API response on create hold (POST to /holds/).

sujalBandhara commented 6 years ago

@rgenito @andrewosenenko Could you please check the API flow for phone number having password in basecamp Task and let me know what I am missing.

sujalBandhara commented 6 years ago

Hi @andrewosenenko I have changed the flow as per your suggestion now

>API REQUEST URL: POST http://dev.geni.to:8001/api/v1/auth/+12397772676/authorize/ >API REQUEST Parameter: {     deviceCode = "8B3570E2-3A71-40D0-94DC-E208F008F5E8";     deviceId = 1251; } **>API REQUEST Header: {     "Content-Type" = "application/json";     "X-Coins-Publisher" = 52; } ==>API Response statusCode [200] ==>API RESPONSE : {     authSource = device;     deviceId = 1251;     phone = 12397772676;     token = ZGV2aWNlOjEyNTE6MTUxOTM5OTIzNHwyZjQ4ZTAwZDQ1YTk4YjkwMzc5YjIwZjI5NGNjNTMwNDllNzZhZDUz;     tokenExpiresAt = "2018-02-23T15:20:34.664Z"; }

In Above case I can see 2 entry with Phone number (+12397772676) in Admin panel. I can see latest entry is verified now. and the Old entry is not verified.

screen shot 2018-02-23 at 5 51 09 pm

sujalBandhara commented 6 years ago

I have made changes as per @andrewosenenko suggestions.