cordova - How can I use launchmyapp with Meteor for the verify-email link? -


i'm using meteoric package run ionic on meteor app. i'd use https://github.com/eddyverbruggen/custom-url-scheme (nl.x-services.plugins.launchmyapp plugin) in app. using it, isn't working right.

i'm trying use plugin deep link url app. right i'm trying work verify-email link. click link , takes me app, wants me login first.

the link being sent looks this.

myappname://verify-email/longtokenidhere1212332 

if click app launch, ask user login credentials instead of verifying email address.

update 1:

i have working. added handleopenurl global function below

meteor.startup(function() {     handleopenurl = function handleopenurl(url) {         var token = url.replace("myappname://verify-email/", "");         console.log("token: " + token);         router.go('/verify-email/', {"paramtoken": token});     } }); 

now see token print console.

but when routes route not found page. how can print current url console see if i'm getting right full url path? tried window.url, prints urlconstructor() object.

"/verify-email" not iron router route; it's baked meteor itself.

so instead of router.go(), can make call accounts.verifyemail client, this:

meteor.startup(function() {     handleopenurl = function handleopenurl(url) {         var token = url.replace("myappname://verify-email/", "");         console.log("token: " + token);         // mark client's email verified using token         accounts.verifyemail(token,              function(error){                if (error) {                    console.log("email not verified");                } else {                    console.log("email verified successfully!");                }             }         );     } }); 

Comments

Popular posts from this blog

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -