How to check email existence using emberjs email-existence? - ember.js

Ember does give a link for email-existence.
But can somebody please explain how to use this API for checking an email whether it exists?
https://github.com/nmanousos/email-existence

Actually it doesn't have much to do with Ember in the beginning. You have to create a node.js application and install email-existence package, then, you have to expose an API for Ember and send a request from client application to your backend.

Related

Need guidance on how to obtaining ADAL access_token in Ember SPA via JSLL

I have and Ember SPA that uses JSLL to interactively log a user in and then make cross-domain calls to our dependent services. I'm working on a VSTS Release definition that will deploy the app then invoke a particular 'health page' that executes synthetic transactions to the dependent services and reports.
What I need guidance on is the proper way to bypass the interactive login but still be able to acquire heedlessly the access_token(s) needed for the ajax calls to the dependent services.
VSTS provides a SYSTEM_ACCESSTOKEN build variable that would make secrets management very simple but I don't think it is well suited for what I'm trying to do.
The best way I can figure is to create a service principle in AAD, provision that account with my dependent services and programmatically login to acquire the token then just use that token for the Bearer token in the Authorization header.
Is there any better approach?
If that is the recommended approach can someone point me to the JSLL/ADAL API that would accomplish that?
You can refer this code sample to integrate Azure AD with Ember framework. After you download and run the project, you may find the error about container.lookup is not a function since the reference to Ember is the latest version.
To make the code sample work, you can replace the Ember reference using the version 2.0.0-beta.3 like below:
<script src="https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.0.0-beta.3/ember-template-compiler.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.0.0-beta.3/ember.js"></script>

Does Ember CLI Mirage store data in a database? or the posted data gets removed after refreshing the browser?

I am a newbie to ember and i am using ember cli mirage for servers side API. For example, i want to POST a movie to the movies route, it gets added to the existing one's present in fixtures and is listed in localhost-4200/movies.
On refreshing the browser, the one's posted gets erased and the default one's remain.
Is this the expected behavior ?? Won't the details remain the same after browser refresh or when i reload the next time?
Yes, this is the expected behavior. Fixtures will be applied on pageload.
Mirage was created to let you easily fake your JSON API. It's built on existing libraries, but brings along conventions to make setting up your fake server quick and painless.
Mirage is not a production API, it fakes your API for easy development and testing, but if you need a persistend API, you need to write one by yourself.
If you want to start building a server, but you dont know where to start, take a look at https://github.com/emberjs/data and JSON-API server implementations: http://jsonapi.org/implementations/

Ember.js consuming REST Services

I have been working on a web app using .NET web forms. Now I'm trying to move to a Web API and a client side application. I'm trying to use Ember.js right now. I'm starting to get confused with Ember 2.0, Ember-Data and stuff.
My problem right now is that I'm trying to consume some of the REST services in order to show a list of things in my Ember app. Is it mandatory for me to use Ember-Data? If not, how can I consume the services to create, read, update and delete items (I mean, am I able to use only ajax or something)?
The Web API was built in order to be usable for many technologies. I need to build an specific URL for each request (even a simple GET has some mandatory parameters). That's why ember-data is not working well for me, at least not what I have learnt about it. Because this.store.find won't allow me to build the URL I need.
Greetings.
Is it mandatory for me to use Ember-Data?
No, it's not. You can use other libraries such as Ember RESTless, or write your own.
You can even use simple jQuery AJAX calls whenever you need to fire a request to your API, however, you'll loose many benefits of Ember Data, such as lazy, asynchronous loading of models when they are needed.
That's why ember-data is not working well for me, at least not what I
have learnt about it. Because this.store.find won't allow me to build
the URL I need.
You can override buildURL method of adapter you're using(for example RESTAdapter), source code on GitHub could be helpful if you would like to do that, and you can find everything you need to create your own behavior for buildURL method in Ember API documentation.

How to call a parse-cloud function in ember.js controller?

I am working on a ember-cli app which fetch data from parse-cloud using ember-parse-adapter . It was working fine until recently i need to call a parse-cloud function in my ember controller. So, is there a way that i could use ember-parse-adapter to call parse-cloud function or any other approach to do that.
I don't know of a way with the ember-parse-adapter BUT:
You can make your own AJAX calls via jQuery $.ajax and the Parse REST API
You can use the npm package for Parse.
npm install parse
Go to node_modules/parse/build and copy parse-latest.js to your /vendor directory
Import into your app using Brocfile.js - app.import('vendor/parse-latest.js').
The Parse namespace and SDK are now available everywhere in your app.
Keep in mind both these approaches have security concerns as you will be making your API key available to anyone who inspects your app.

What is needed server-side to use ember-data?

I'm trying to get started with ember; after reading all the documentation, now i'm trying to move the example todo app to a server;
In the example the app is configured for using the LS Adapter for local data;
if i want to use data from the server, what i need to handle the ember-data get request?
I'm a beginner in this; what i mean is: is needed some kind of servlet to deal with ember-data? Where the data should be stored on the server?
I spent hours on google but i still confused about this; can you provide some input to drive me in the right direction?
You can use any web-server technology stack you like with Ember Data. Ember data is just the frontend 'module'/'component' used to send requests to that server depending on actions invoked by your ember app, so it can keep everything in sync.
You simply build a RESTful API for your Ember App to consume and make sure the JSON you return is in the format ember data expects.
You could look at ember-rails, a good starting point for rails-based ember apps with ember data.