Ionic2, Microsoft package, & Azure ADAL failed Authentication - ionic2

I am posting after extensive research about the subject and hope to get an answer.
I am using ADAL for Azure authentication following the Ionic2 guide: https://ionicframework.com/docs/native/ms-adal/
In it, they define the AuthenticationContext as follows:
let authContext: AuthenticationContext = this.msAdal.createAuthenticationContext('https://login.windows.net/common');
When I run the app in the browser, immediately i get a "validation failed: undefined" error message.
Other guides define the variable as follows:
var authContext = new Microsoft.ADAL.AuthenticationContext('https://login.windows.net/common');
I couldn't import Microsoft package, so I followed the solution for this question: 3rd Party Library “cordova-plugin-ms-azure-mobile-apps” not getting recognized in my Ionic 2 app
However, now i get the error: cannot read property 'ADAL' of undefined
Any help is appreciated. Thanks in advance.

The MS AL a cordova plugin, it doesn't provider the version for running in the browser. It is required to run under the cordova environment(Android, iOS, Windows platform) instead of browser.

Related

Apollo server v3 playground offline

I migrated from Apollo server v2 to v3 and I had trouble loading a Graphql playground override for offline usage.
The previous syntax was by filling the "playground" property in the Apollo server constructor but now this property doesn't exist.
So after looking for the new way to load my offline playground I found that there is a plugin called ApolloServerPluginLandingPageGraphQLPlayground in the apollo-server-core package.
This package behaves expects the same params as the old syntax and it worked for me.
Hope it will be helpful for someone.

Django Microsoft Authentication Backend not succeeding on new deployments

I have an app deployed in many places and it uses Django Microsoft Authentication Backend. Starting yesterday when we deploy the app the auth is now not working. We get back Failed to authenticate you for an unknown reason. Please try again later. We can see in the azure logs that the login was successful. We have the same version of Django Microsoft Authentication Backend installed, but for some reason on newly built boxes it is failing but older ones it is succeeding. What could be causing this? What can we check to track down what the issue may be?
We finally found the issue - I said we had the same version of all the python packages but we did not - the new system had 2.0.1 version of pyjwt. When we downgraded to 1.7.1 it started working again. The requirements file for Django Microsoft Authentication Backend have pyjwt [required: Any]

Ionic AWS Error

I am attempting to connect my Ionic mobile app to AWS backend and keep getting the same error.
Cannot find module "../aws-exports"
I've checked the node-modules folder and this is missing, but I have no idea what I should put here to fix this error.
The same code is in a lot of files in this app.
const aws_exports = require('../aws-exports').default;
I'm not sure what this code does exactly. If anyone has an experience with Ionic that could help that would be great.
Thanks,
Matthew.
You need to follow the steps in the README. Specifically, the section on Creating AWS Mobile Hub Project. When you init the AWSMobile project, aws-imports is created for you.
P.S. aws-amplify has introduced some changes in the last couple of weeks that cause the ionic starter to not work. Follow these steps to fix the errors.
If you sign into your Amazon console and you go to your Mobile Hub.
https://console.aws.amazon.com/mobilehub/home#/
You can click on your project and it will return the ID in the URL as follows:
https://console.aws.amazon.com/mobilehub/home#/YOUR_ID_HERE/build
You can then run the following command:
awsmobile init <mobile-hub-project-id>
The AWS Mobile Hub scripts should then fetch all relative dependencies and make the appropriate installations to rectify the issue.

WSO IS 5.3.0: user dashboard not working out of the box

I'm evaluating WSO2 identity server for a customer of mine and currently we ponder whether to write our own user dashboard or use WSO2's version of it.
According to WSO 5.3.0 it's as easy as opening /dashboard. I don't find anything about how to install or enable the user dashboard and I didn't find a module I could install. Therefore I think that this should work out of the box. Yet, when I open the URL I get an error:
HTTP Status 500 - org.mozilla.javascript.EcmaError: ReferenceError:
"readFile" is not defined. (/dashboard//login.jag#47)
type Status report
message org.mozilla.javascript.EcmaError: ReferenceError: "readFile"
is not defined. (/dashboard//login.jag#47)
description The server encountered an internal error that prevented it
from fulfilling this request. Apache Tomcat/7.0.73
I tried to find the cause of this issue but the log files are in no way more verbose and after looking at the includes of login.ja redFile seems to be defined.
Can anybody please point me towards something that helps me solve this issue?
Thanks in advance!
For some reason (that are still to explore) three modules that were in the installation archive were missing from the actual installation. The modules were: caramel, handlebar and markdown. After installing them from the archive the dashboard started working.
Installing caramel only didn't work and my guess is that markdown is not necessary to run the dashboard but I might be wrong.
I found that is does not work with Safari. Identity Manager does.
I originally tried it on MacBook pro.
When I tried it with Chrome all is well.

Titanium app not opening android N

Appcelerator application is not opening after installation. I tried one android module which was invoked in index.js to check if device datetime was enabled.When i commented this module reference from tiapp.xml, it worked. But i need this module. Please help on this.
Which version of Titanium SDK are you using? If we consider that you are using SDK 6.0 and above, then for Android modules, you need to re-build them with Titanium SDK 6.0 to make it compatible. For this reason if you remove the module it is working fine. Can you rebuild the module using the updated SDK and confirm.
I found the root cause is that Camera,Location,Storage,Calendar permissions are not getting set on app launch. Once i enable them manually via device app settings its working. I tried to set these permissions via example in
http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Android Permissions section but not getting set. Please advise how to set permissions in Android N