Can we use adal-angular for Mobile applications developed using Cordova? - angularjs

I've used adal-angular for a web based Single page application. Can I use the same library for applications built using Cordova for ADAL Authentication?

That is not recommended, as ADAL JS is designed for handling the SPA case but is not supported for native clients. Furthermore, you'd suffer with sandboxing limitations that aren't strictly necessary when using Cordova. See the preview of our cordova plugin for ADAL instead: https://azure.microsoft.com/en-us/documentation/articles/active-directory-devquickstarts-cordova/

Related

Responsive website into app or Hybrid mobile app?

So after too many searches I decided to ask this question.
First of all I'm building a mobile app using angularjs in my website (Online) not localhost. The app is a kind of a CRM based (CRUD mostly).
I have the cordova mobile application ready. I have a few questions here.
Is it acceptable, if I use the website URL directly in the inappbrowser URL (Like an iframe)?
Or. Should I need to put the angularjs files inside the www directory of the cordova app and access the server functions via API?
Which way is preferable? Why?
Will there be any performance differences?
If the No.1 is not a best practice, what is the major drawback on using the inappbrowser?
You can build Hosted Web App in an Apache Cordova:
For this scenario, you use a thin Cordova client (think of it as a web
browser embedded in a native app) that automatically redirects to your
Web site.
See also: Wrapping an existing web application in Cordova.
Other option: PWA.
From Wiki:
Progressive web applications (PWAs) are web applications that load
like regular web pages or websites but can offer the user
functionality such as working offline, push notifications, and device
hardware access traditionally available only to native applications.
PWAs combine the flexibility of the web with the experience of a
native application.

ADAL, Angular and WEB API strategy

I am a Microsoft developer. Making an ASP.NET application with authentication to Azure AD is very easy. The traditional multi page application with Vue (as an example) can be created within two minutes (by using the Authentication wizard in Visual Studio). However watching some Angular and NPM videos I liked the CLI/npm approach. So I decided to build my next project using ADAL.js, ASP.NET Core API and Angular 6 (deploy to Azure web app). But I haven't been able to succeed, and have only been met by complexity and issues.
Is the combo of these three technologies just a bad mix, Visual Studio not suited for SPA, or have I just gotten a bad start? Any suggestions on a good setup? I am considering to split the API and front end in two apps, so I can use clean Angular without having to worry about who is building TypeScript (VS or Node) etc. But then I need two web apps, and have to worry about CORS. Any suggestions here, what is a good setup to get started?
I have followed a lot of articles like:
http://www.talkingdotnet.com/how-to-create-an-angular-6-app-with-visual-studio-2017/
https://www.npmjs.com/package/microsoft-adal-angular6
But all of them had issues.
Refer to this Microsoft published GitHub sample. This sample demonstrates the use of ADAL for JavaScript for securing an AngularJS based single page app, implemented with an ASP.NET Web API backend, that calls another ASP.NET Web API using CORS.
Call an Azure AD protected Web API in an AngularJS Single Page App

Include the firebase-admin SDK module in angularjs

I want to use firebase-admin in angularJS but i don't know to do that.
any help will be appreciated. thanks.
The Firebase Admin SDK is designed for use in trusted environments, such as server-side node or server-side Java. It is not meant to be directly used in client-side environments, which is where Angular is targeted.
There are valid use-cases for showing the information from the Firebase Admin SDK in a client (such as an administrative web interface). But in those cases, you will have to create your own server-side node.js API (e.g. through Express) and consume that in your Angular app.

How to set up authentication already setup in MEAN app in Ionic app?

I am developing an application using MEAN Stack. However I am developing an app using ionic framework for the same application. How would I use the same authentication used in MEAN, in Ionic framework app?
Ionic Framework is built on top of Angular. I would suggest you to use token-based authentications for that; one popular strategy would be JSON Web Tokens (JWT). JWT is basically a standard to transmit data between communicating entities (client/server) through JSON.
I am not exactly sure what kind of authentication system are you using in your MEAN app. It's very likely that you will be using cookie-based authentication. If that is the case, you will need to alter your code so that instead of storing user/session info in cookies, you'll store them in JSON. You can check out the jsonwebtoken module for that.
There are a couple of token based authentication tutorials out there. You could try these out:
https://thinkster.io/angularjs-jwt-auth
http://code.tutsplus.com/tutorials/token-based-authentication-with-angularjs-nodejs--cms-22543

Is requirement of AngularJS for big web based app necessary?

I wanted to build a maven based project based on google app engine which uses RESTful web services. So is angularJS really required in this type of project or can it be achieved without it also?
No, AngularJS is not required. While it provides a $resource module that works with RESTful web services, you can use other front-end tools as well. For example, smartphone apps written in their native languages can use RESTful services.

Resources