NetTalk Central

Author Topic: capturing Phone number on log in  (Read 2861 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
    • Email
capturing Phone number on log in
« on: April 20, 2021, 05:27:09 PM »
Hi,
I would like to record the  cell phone number of the user's device, when logging in on a NT app
Is there a way?
Thanks
Richard
NT 12.13

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11158
    • View Profile
Re: capturing Phone number on log in
« Reply #1 on: April 20, 2021, 08:25:36 PM »
Hi Richard,

it's probably not surprising to discover that the user's phone number is not exposed to the browser.
Can you imagine if your phone number was recorded simply by visiting a web site?

If you want the user's number, ask for it, and if they want you to have it they'll fill it in.
You can of course verify it by sending them a code via SMS which they then have to enter to verify the number.

Cheers
Bruce

Richard I

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
    • Email
Re: capturing Phone number on log in
« Reply #2 on: April 20, 2021, 08:31:09 PM »
Yes, Thanks Bruce, on reflection, a silly question.
Thought it might be as simple as recording coordinates....
Richard

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11158
    • View Profile
Re: capturing Phone number on log in
« Reply #3 on: April 20, 2021, 08:32:56 PM »
You'll recall that even capturing co-ordinates requires the user to "share location" - ie they get a popup asking for that permission.

Alas there is no similar setting for access to the phone number (that I am aware of.)

Cheers
Bruce

Richard I

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
    • Email
Re: capturing Phone number on log in
« Reply #4 on: April 20, 2021, 08:45:54 PM »
Ive been asked to write a Panic App
Push the button-
records Cell ph and coordinates
Writing to a monitored database



urayoan

  • Full Member
  • ***
  • Posts: 222
    • View Profile
    • AZ Rock Radio
Re: capturing Phone number on log in
« Reply #5 on: April 21, 2021, 03:43:03 AM »
Hello Richard I
  Even if the app is written in native language for mobile, access to the phone number is restricted for privacy issues.

Maybe a workaround you can do is, ask the phone number to the user at the moment of login to send a kind of validation code (similar to two factor auth), and with Secwin send the SMS with the code and validate the phone number is indeed real.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11158
    • View Profile
Re: capturing Phone number on log in
« Reply #6 on: April 21, 2021, 09:56:06 PM »
Hi Richard,

>> Ive been asked to write a Panic App
>> Push the button-

In this setup you don't actually need the cell phone number. Since presumably this is a service that someone signed up for etc.
So as long as the user has installed the app, and linked it to some account, you have an identifier. (it could be the phone number, but really it could be anything.)

So as part of the install the user would install the app, and "login" to the system. Using their ID. (which could be their phone number). You can store that locally, and provide it when the panic button is pressed.

Reading the actual number from the phone is unnecessary - just let the user fill it in on a settings screen.

Cheers
Bruce

Richard I

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
    • Email
Re: capturing Phone number on log in
« Reply #7 on: April 21, 2021, 10:15:17 PM »
Yes, Thanks

However the nature of the intention is simply to open the app and push the appropriate button,
The user may not have the  time or the skills to enter a  login code, and then push the option button for fire ambulance or police.
What about "remember me on this device " ? does that hold locally?

Thanks for input
Richard

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11158
    • View Profile
Re: capturing Phone number on log in
« Reply #8 on: April 22, 2021, 08:49:13 PM »
>> However the nature of the intention is simply to open the app and push the appropriate button,

which they can absolutely do, because you capture their phone number from them when they _install_ the app (ie run it for the first time.)

In other words;
a) visit web page, sign up for service, install PWA or app or whatever, enter config details...

... time passes.....

b) ahh - Panic - open app - press button....

>> The user may not have the  time or the skills to enter a  login code, and then push the option button for fire ambulance or police.


I'm guessing they probably also don't have time to visit the site, download the app, install it, whatever either. So your flow suggests that step a) above happens long before panic time...

Cheers
Bruce



Richard I

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
    • Email
Re: capturing Phone number on log in
« Reply #9 on: April 22, 2021, 10:15:09 PM »
Yes, thats it Bruce !

Recording  Phone number on Registration is good.
but, Im intending to run this from a web server - How will I capture who has opened the app when the appropriate button is pushed?
There will be a shortcut on the phone pointing to the URL
That is my intention,
However I note you refer to Progressive Web Application - Im guessing that is a NetTalk Apps feature?

Thanks
Richard
« Last Edit: April 22, 2021, 10:26:34 PM by Richard I »

DonnEdwards

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • Insights and Rants
    • Email
Re: capturing Phone number on log in
« Reply #10 on: April 22, 2021, 11:49:53 PM »
Pogressive Web Apps is part of NT Apps. I'm not sure whether it will work for NT Server, but you can check what options are available when you create the app.

If you are using NT Server and Secwin 7 the site will remember if you have logged in or not, and you can set the time limit. It's really convenient. I'm not sure if the standard login does the same.

If the user has registered from the phone, isn't there a (first party) cookie on the phone for the website? Perhaps you could store the user ID of some kind in the cookie?

It used to be that all mobile browsers sent the mobile phone number (MSISDN) to the web server in the headers. I'm glad it doesn't happen any more, because it was badly abused. see blog article from 2011

You need to add a timer or something to the panic button so the user can cancel the panic if they clicked on it by mistake. I have a "trackbox" app on my phone that gives me 10 seconds to cancel the emergency when I open the app. After that it notifies the server.

Hope this helps!
Donn
« Last Edit: April 22, 2021, 11:59:21 PM by DonnEdwards »
If you're happy with your security, then so are the bad guys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11158
    • View Profile
Re: capturing Phone number on log in
« Reply #11 on: April 23, 2021, 04:36:31 AM »
>> I'm intending to run this from a web server - How will I capture who has opened the app when the appropriate button is pushed?

What you can do is set a Cookie. This is a bit of data which is stored in the browser, and then any visits to your site will include this data. Check it out here;

https://www.capesoft.com/docs/NetTalk12/NetTalkWebBasic.htm#Cookies

So basically you can store their phone number in a cookie, then when they press the button the phone number will be sent to you, and you can access it via p_web.GetValue.

Cheers
Bruce



Richard I

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
    • Email
Re: capturing Phone number on log in
« Reply #12 on: April 23, 2021, 07:16:26 PM »
Thanks Bruce,
Ive got enough now to proceed.

Cheers
Richard