ionic 3 deeplinking for reset password - ionic-framework

I am creating a mobile application using ionic 3. I need to know the logic to implement reset password functionality. till now, i am able to send an email with reset token to the user.
I was thinking that id user clicks on the link in the email, if app is installed then it should open the application page dedicated for reset password.
So i did a little research and found that it can be done using DeepLinking ( custom url to respond) like myApp://resetPassword/{token}
Now the problem is in gmail when you send link with custom url, it removes the href option.
Can some one tell me slight information to implement this functionality and some articles to read.
Thanks,

I found this issue https://github.com/EddyVerbruggen/Custom-URL-scheme/issues/81 concerning this href removal in gmail.
They recommend - just as user1027620 - to create a regular html page and use JavaScript redirection to do the trick.
I guess you will indeed need JavaScript to get the arguments (unique token...) from the url and copy them in the myApp://resetPassword url.

Related

Firebase 3 - sends only a password reset link and no code

Does Firebase 3 no longer send a reset code with the sendPasswordResetEmail() method? I am only seeing a reset link in the email.
Firebase has expressed interest in supporting sending code in addition to link for password reset. However there is no timeline when that will be ready.
One thing you can do is to create your own password reset landing page and parse the code from the url and display it to the user to copy into your app. I am guessing you are using a single page app and that is why you are interested in getting the code directly. Check the documentation for more on how to create your custom landing page.
https://firebase.google.com/docs/auth/custom-email-handler

Facebook app shows doamin as "This url has been identified as malicious and/or abusive"

I am new to facebook app. I have just purchased one domain and trying to integrate facebook login with my website. My website is with SSL. I have purchased SSL even. But when I try to add domain in App Platform it gives me error as "This url has been identified as malicious and/or abusive".
I am not able to understand how this is possible. Is there any way out to remove this error or to contact facebook for same.
Solution according to: https://www.forbes.com/sites/caroltice/2013/03/15/when-facebook-calls-you-abusive-reclaim-your-reputation/
First go to: https://global.sitesafety.trendmicro.com/
and check if your URL appears as non safe or as Untested
Click on reclassify --> url reclassification request
Then select the option SAFE
Suggest a category
Add your email
click the button to proceed, then go to yuour email and click the link that trendmicro sent to you, then wait
other links: https://global.sitesafety.trendmicro.com/index.php
https://www.trendmicro.com/en_us/about/legal/detection-reevaluation.html
Website name and details should follow all the terms and conditions of Facebook.

Redirect the page from external website to web pages using play framework

I am pretty much new to play framework and I am currently developing a website using this framework.
I have the following question:
Default page should be gmail.com and the once the user entered his credentials and if the user is authorized(I mean login successsful) then it should redirect to the my website along with the retrieval of user name.
To make it as simple:
say my website is www.hellow.com
Once the user enter hellow.com then it should redirect to gmail.com and once the gmail login is successful then it should come to hellow.com with the username.Though I am using redirect() but am not sure how to come back to my site once the login successful.
Currently I am using latest play version.
Please help me out.
Thank You
It's not about redirect. You need to use Google API to be able to provide sign in with it. Start here: https://developers.google.com/gmail/api/auth/about-auth

How to authenticate a website user through iphone

I have created a web application and now I want to create an iPhone version of it. As a first step, I want to login a user using his username and password. I have a simple login page with fields for username and password. Now I want to send these credentials onto my site (lets say, www.abc.com/login) and authenticate whether the username and password is correct or not.
I need some help in this as I am not an experienced iphone developer. I just need to know how to send the credentials to my site url.
Any help or sample tutorial in this regard will be highly helpful to me.
Go get ASIHTTPRequest as it is a great framework for any network connectivity you do. the you can simply use POST or use the method they have provided for authentication.
See the section titled "Handling Authentication" here for code samples and docs
better make a canvas and call that page of webapplication..

How do I get the Twitter API to respect the callback parameter with OAuth?

I'm working on an iPhone app that ideally uses OAuth to communicate with Twitter. I know a lot of people are doing the OAuth workflow inside of their apps using a UIWebView, but I don't agree with that and am going with the Pownce approach.
The problem is, Twitter has this whole scheme for working with desktop apps, using a pin number. When I register my app with Twitter, they have a web form asking me if I'm a desktop or web client. If I choose desktop client, when I try to have the user authorize, I can set the oauth_callback parameter but Twitter will ignore it after authorization and show a pin number. If, on twitter's form, I specify that I'm a web client, it requires me to enter a URL to redirect to after authorization. And, since I'm using an iPhone app-specific url scheme, their web form fails on validation as it only seems to accepts URLs conforming to the HTTP protocol.
So, it seems like I'm stuck - I can't say "desktop" because I don't want to bother with a pin, and I can't say "web" or I can't use an iPhone app URL. Any solution to this?
From your question:
I know a lot of people are doing the OAuth workflow inside of their apps using a UIWebView, but I don't agree with that and am going with the Pownce approach.
The Pownce article suggests that quitting your application and opening Mobile Safari to perform the authentication step is problematic, and that they started receiving bad reviews from users for doing it that way. They also experienced a failure rate of around 40%.
Pownce's solution is to use a UIWebView within your application instead, so I have a feeling you may have misinterpreted their recommendations. That being said, they do label this as a "naive" solution and go on to suggest a bunch of theoretical "ideal" solutions.
Another point you might not realise is that desktop applications (using the "out of band" / pin number method) and web applications need to open the Twitter site in either an embedded or external browser.
So you've got two choices on the iPhone:
Open up twitter.com in a UIWebView, specifying no oauth_callback parameter or oauth_callback=oob to start the pin-based out-of-band flow. The user then needs to copy the pin using the iPhone's copy-paste functionality, manually close the UIWebView, and paste the pin into your application. The pin can then be used converted to an access token.
Do it how everyone else is doing it (UIWebView + custom-uri://foo.bar in the callback parameter).
For obvious reasons, the first option is pretty crap and really only useful on platforms where Twitter is unable to redirect to a custom URI.
A simple solution may be to create an HTTP page that always sends a 301 redirect to your custom URL scheme and then provide that HTTP URL to the twitter web API.
Aside from that, Nathan's answer is very complete.
Here's how I do it: tell Twitter you're a web app, and make up any old HTTP:// URL to satisfy Twitter during registration of your oauth client.
Then in your app, pass the URL you want to in the callback parameter. Twitter (in my experience) uses the one you give it.
You could use an intermediate website for the authentication. Your app creates a unique id (hardware based?) and stores it. It then records it has sent the user for authentication and sends the unique id to your website. It then redirects the user to your website. Your website then sends the user to Twitter using oAuth. The user returns to your website and you mark the unique id as authenticated and store the authentication information. The user restarts the app on the iPhone, it reads it has sent the user for authentication and contacts your website with the unique id - and reads in the authentication information.
Long winded and needs another website, but it should work.