Thank you @wade, I did it, thanks to your post reply and this medium publication https://medium.com/@euginedubinin/touch-id-ux-for-ios-app-efe4de3bc245 I understood how it works, and it was this way:
01 First of all the authentication user trough the bubble API it is working fine, this app is based on the photo saver wit bubble backend
02 I created two new Device variables, string,: TIDS u & TIDS p (touch id user - touch id password)
03 I created a page variable, Boolean, in the login page ( nuevo touch id)
04 when tapped the button before to run the api to login I apply true to the page variable (nuevo touch id = true)
and the run the api request for login
- 05 When I get the 200 response in the login just before the go to page (next page where I show the photos) I checked if the page variable (nuevo touch id ) it is true ,(i do this tho check always if the user has entered the credentials by keyboard and no by touch id or face id
if it is true, I launch a Authenticate with Touch ID / Face ID with the reason (Activa tu id) this means it is the first time I am going to use the touch id / face id and I am going to initialize, if the user use his finger or face it means is a Successful Authentication, so I set the values the new devices variables, for the TIDS u, the value will be the user email field text,
and for the TIDS p will be the user password field text,
all this means the device has saved the user email and password and it is working as a system password manager and I can retrieve that credentials with touch id / face id .
If the the Authentication Failed or the user cancel the touch id / face id it just continues without save anything to the next page, and everything works fine.
- 06 So now when I run the app, when the login page appeared I check if I have saved the device variables for user email and password , (if they are empty it just ignore al this an do nothing) if they are not empty, any of those variables I used TIDS u( which means I already save the user credentials) ,
I launch another Authenticate with Touch ID / Face ID with the reason (utiliza tu id) with means use your touch id, which is already saved in the phone, if the user use it and is Successful Authentication I set the value of user email text field with device variable TIDS u which contains the user email already saved by the first touch id / face id
I do the same with the password field text:
then i set the value of the page variable (nuevo touch id to false)
and then run the api request for login
- 07 so when the API for login is called and we have a 200 response and check if the page variable (nuevo touch id) is false or not, and because we just set it up as false, it does not call this Authenticate with Touch ID / Face ID and no save the devise variable which already have the user credentials and just go to the next page and everything worked like magic
So this is the way I setup a Authenticate with Touch ID / Face ID and made it work, I know still need a little touches but it is in the right way and working fine the way it is supposed to be.
I hope this helps to somebody and do not hesitate to ask anything and if I happen to know the answer I will help ypu gladly.
(please forgive my typos and bad grammar)