Autofill OTP verification code in nativescript? - nativescript

How can i change the TextView property content-type to oneTimeCode so that i can get otp in the suggestion of app.
Reference: https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_a_text_input_view

Related

How to get Access Token for Client Based Application for Zoho API?

Does this mean Zoho API documentations are wrong?
I'm following the "client based applications" as my app is a ReactJS based app. Unfortuantely im getting a fetch failed type of error when trying to request an authentication token using response_type = token.
Very frustrating indeed.
What is the proper way to get an auth token for ReactJs apps?
You can get it by chrome(or firefox)
Get format (make single line)
https://accounts.zoho.com/oauth/v2/auth?
client_id={your client id}&
response_type=token&
scope=AaaServer.profile.Read&
redirect_uri={your app redirect URI}
This is steps
Get client_id and redirect_uri from my Zoho Setting
https://api-console.zoho.com/
Make single line string with upper format
put that string and enter from Chrome
The client id and redirect URI should be match your App settings.
Click the Accept button with checked Grant access checkbox
Will get the access token at address editor in Chrome
Get new access token with this format
http://localhost:3000/#&
access_token={get-new-access-token}&
expires_in=3600&
location=us&
api_domain=https%3A%2F%2Fwww.zohoapis.com&
granted_for_session=true
You can make your React app for getting access token with this steps.

Read browser URL from Xamarin form android for custom OAuth code sent from the IDP in redirect URL

I am trying to implement custom OAuth login into my Xamarin application.
I am hitting the OAuth API from browser when a Login button is clicked.
It is redirecting to my custom OAuth authentication page and after initial authentication it sends an auth code in the URL of the auth.html from my domain page. I need to read that URL and process further.
My code in the button click :
var apiEndpoint = "https://auth.example.com/oauth2/authorize?response_type=code&client_id=myclientid&redirect_uri=https://example.com/apps/auth.html&state=STATE";
await Browser.OpenAsync("apiEndpoint", BrowserLaunchMode.SystemPreferred);
I need to read the code from the URL when is is returned from my domain redirect uri as below:
https://orion.lexmark.com/winapps/auth.html?code=12358123-2200-4ga6-a806-8f60f5636ac8&state=STATE
I am very new to the xamarin world, any help on this will be appriciated.
The most common way to do mobile OAuth is to use a Private URI Schene URL such as this, which will then invoke the app with the login response when it is returned to the browser:
com.mycompany. myapp:/callback
It is standard to also open the URL via an integrated form of the system browser - a Chrome Custom Tab on Android.
Developers usually also plug in the open source AppAuth libraries to do the tricky work of using OAuth messages correctly. This will be harder in Xamarin though, due to the extra layers.
I would recommend having a look at AppAuth and at least borrowing some ideas from it. My Android AppAuth Blog Post explaims a fast working setup.

Maintain sessions in custom WebView Xamarin

I am using custom renderer for WebView to send headers in request in my PCL project. I am sending session token and i dont need to type password and login name. Thing is when I start to navigate in webview it throws me to the login page and makes me login. When I login normaly it saves session.
My question is how can I save session when I accesse the page using session token?

Parse HTML Email Verification Mail Template

Is there a possibility to set HTML body to the password recovery and the email verification mail?
As I can see, the template which can be modified in parse.com is a plain text body.
If there is no option for this from the settings menu, can we somehow catch the signup request (Parse user.signUp), and send out manually the emails? The other problem here would be to generate the links..
Any help would be appreciated!

Appcelerator: Custom Password Reset Page - Bad Request, reset_password_token is invalid

I am trying to setup a custom account verification and password reset page on my own domain but I am getting errors when reset the password. If followed the instructions in the link below but it always fails.
http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-request_reset_password
I have setup a page with the URL structure https://example.com/resetPassword/?reset_password_token={{reset_password_token}}.
This is the URL in the reset password email, when I clicking on the link in the email the page load with the form fields visible. On entering the new password the following is passed to GET request is passed to appcelerator.
https://api.cloud.appcelerator.com/v1/users/reset_password.json?key={{app_key}}&reset_password_token={{reset_password_token}}&password={{password}}&password_confirmation={{password_confirmation}}
The response text is:
"{ "meta": { "status":"fail", "code":400, "message":"Failed to reset password: reset_password_token is invalid", "method_name":"resetPassword" } } "
Everything looks fine to me as far I can see and when using the standard URL structure below it works fine.
https://platform.appcelerator.com/#/users/reset_password/{{key}}/{{reset_password_token}}
I found the answer here:
https://archive.appcelerator.com/topic/2838/custom-password-reset-page-bad-request-reset_password_token-is-invalid/3
Basically, you need to add key={{key}} in your email template, and send that along with the url to appcelerator from your form. Also add ct=enterprise to the url parameters.
Doing this i got it working. Had the same problem with invalid reset token. Appearantly you are not supposed to use your own app key, but the {{key}} in the template instead.

Resources