Ionic Facebook authentication - CORS request rejected - ionic-framework

I am running ionic using Visual Studio Android emulator and trying to authenticate a user through facebook using -
Ionic.Auth.login(authProvider, authSettings, loginDetails)
.then($scope.authSuccess, $scope.authFailure);
The call fails with the message in the message: “CORS request rejected: https://api.ionic.io/auth/login/facebook”. Anyone had this problem or know how to resolve it?

Install cordova-plugin-whitelist in your project, and add one of the follow in config.xml
<!-- Allow links to example.com -->
<allow-navigation href="http://example.com/*" />
<!-- Wildcards are allowed for the protocol, as a prefix to the host, or as a suffix to the path -->
<allow-navigation href="*://*.example.com/*" />
<!-- A wildcard can be used to whitelist the entire network, over HTTP and HTTPS. *NOT RECOMMENDED* -->
<allow-navigation href="*" />
<!-- The above is equivalent to these three declarations -->
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />
<allow-navigation href="data:*" />

Related

WKWebView instead of UIWebView - Ionic

New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability.
This is the issue I am facing when developed the App in IONIC and trying to upload the app to appstore.
Add plugin cordova-plugin-wkwebview-engine, preferably the latest version
Make sure you have this in your config.xml and
<platform name="ios">
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
</platform>

Microsoft Word Add-In Failing Submission: Compatibility Issue with Desktop Versions on Windows and Mac

Update: I believe the issue was related to the 80x80 icons, which should have been 64x64.
I submitted a Microsoft Word Add-In to the Microsoft Partner Center (Store), but received the following failure messages:
Predictable Behavior - 1100.4.4.2 O365 Perpetual - Your offer is not working on Microsoft 365 on Windows, Word 16.0.13426.20352 64-bit. Your add-in is not available to be inserted.
Predictable Behavior - 1100.4.4.5 Office for Mac - Your offer is not working in Office for Mac connected to an M365 Subscription. macOS Version 10.15.4 Microsoft Word for Mac version 16.44. Your add-in is not available to be inserted.
The manifest file is below. It passes the npm install -g office-addin-manifest validation test, but apparently cannot be inserted.
If anyone can help, I'd really appreciate it.
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="TaskPaneApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>eb4d03ca-1b89-47b9-9132-6e71b09788ef</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.2</Version>
<ProviderName>Clib Law Ltd</ProviderName>
<DefaultLocale>en-UK</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="Clause Library" />
<Description DefaultValue="Clause Library"/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://cliblaw.co.uk/assets/icon-32.png" />
<HighResolutionIconUrl DefaultValue="https://cliblaw.co.uk/assets/icon-64.png" />
<SupportUrl DefaultValue="https://cliblaw.co.uk" />
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<AppDomains>
<AppDomain>https://cliblaw.co.uk</AppDomain>
</AppDomains>
<!--End Basic Settings. -->
<!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
<Hosts>
<Host Name="Document" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://cliblaw.co.uk/app.html" />
</DefaultSettings>
<!-- End TaskPane Mode integration. -->
<Permissions>ReadWriteDocument</Permissions>
<!-- Begin Add-in Commands Mode integration. -->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<!-- The Hosts node is required. -->
<Hosts>
<!-- Each host can have a different set of commands. -->
<!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
<!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
<Host xsi:type="Document">
<!-- Form factor. Currently only DesktopFormFactor is supported. -->
<DesktopFormFactor>
<!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
<GetStarted>
<!-- Title of the Getting Started callout. resid points to a ShortString resource -->
<Title resid="Contoso.GetStarted.Title" />
<!-- Description of the Getting Started callout. resid points to a LongString resource -->
<Description resid="Contoso.GetStarted.Description" />
<!-- Point to a url resource which details how the add-in should be used. -->
<LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl" />
</GetStarted>
<!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
Think of the FunctionFile as the code behind ExecuteFunction. -->
<FunctionFile resid="Contoso.DesktopFunctionFile.Url" />
<!-- PrimaryCommandSurface is the main Office Ribbon. -->
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
<OfficeTab id="TabHome">
<!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
<Group id="Contoso.Group1">
<!-- Label for your group. resid must point to a ShortString resource. -->
<Label resid="Contoso.Group1Label" />
<!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
<!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
<Icon>
<bt:Image size="16" resid="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="64" resid="Contoso.tpicon_64x64" />
</Icon>
<!-- Control. It can be of type "Button" or "Menu". -->
<Control xsi:type="Button" id="Contoso.TaskpaneButton">
<Label resid="Contoso.TaskpaneButton.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="Contoso.TaskpaneButton.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="Contoso.TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="64" resid="Contoso.tpicon_64x64" />
</Icon>
<!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<!-- Provide a url resource id for the location that will be displayed on the task pane. -->
<SourceLocation resid="Contoso.Taskpane.Url" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<!-- You can use resources across hosts and form factors. -->
<Resources>
<bt:Images>
<bt:Image id="Contoso.tpicon_16x16" DefaultValue="https://cliblaw.co.uk/assets/icon-16.png" />
<bt:Image id="Contoso.tpicon_32x32" DefaultValue="https://cliblaw.co.uk/assets/icon-32.png" />
<bt:Image id="Contoso.tpicon_64x64" DefaultValue="https://cliblaw.co.uk/assets/icon-64.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Contoso.DesktopFunctionFile.Url" DefaultValue="https://cliblaw.co.uk/Functions/FunctionFile.html" />
<bt:Url id="Contoso.Taskpane.Url" DefaultValue="https://cliblaw.co.uk/app.html" />
<bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="Open Clause Library" />
<bt:String id="Contoso.Group1Label" DefaultValue="Clause Library" />
<bt:String id="Contoso.GetStarted.Title" DefaultValue="Do more with the Clause Library add-in!" />
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="Click to open Clause Libary" />
<bt:String id="Contoso.GetStarted.Description" DefaultValue="The add-in is loaded." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
<!-- End Add-in Commands Mode integration. -->
</OfficeApp>
Thanks,
Dean

Too many redirects ONLY in IOS?

This site works fine everywhere except in IOS.
http://www.pepedivecenter.com.
It works in Windows with Firefox, Chrome or IE.
It works in OSX with Safari or Chrome
It works in Android phones
BUT, it does not work in IOS (iPhone or iPad) using Chrome or Safari!
When I try to open the site in an iPad or an IPhone with Chrome or Safari I get a TOO MANY REDIRECTS error.
The web.config is pretty clean:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="PHP_via_FastCGI" />
<add name="PHP_via_FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\php\php-cgi.exe|-d open_basedir='D:\XVRT\pepedivecenter.com\Html;D:\XVRT\pepedivecenter.com\html\new'" resourceType="File" requireAccess="Script" />
</handlers>
<security>
<ipSecurity allowUnlisted="true">
</ipSecurity>
</security>
<staticContent>
<remove fileExtension=".htm" />
<remove fileExtension=".html" />
<mimeMap fileExtension=".html" mimeType="text/html" />
<mimeMap fileExtension=".htm" mimeType="text/html" />
</staticContent>
</system.webServer>
</configuration>
I tried enabling and disabling the friendly urls,
the site is running under IIS so I tried several configurations with web.config
I cleaned joomla's cache and redirects.
I cleaned the browsers cache and cookies.
I updated everything to the last version (joomla 3.6.5)
but the problem continues.
How can I troubleshoot this problem? any ideas?
tks!
I found a workaround.
The problem was caused by the Joomla plugin "System - Language Filter".
I disabled this plugin and now the site works in IOS.

Office Add-in show warning - unsupported features by its add-in catalog (SharePoint App Catalog)

I'm trying to deploy a Word Add-in.
I've deployed the backend on an onpremises server to IIS. And I've checked it's accessible.
I've created an app catalog in Office365 and uploaded the manifest file to the catalog. The catalog shows that the Add-in is valid
I've added the Office365 app catalog to the trusted catalog sites
I can add the app, I see that it shows part of my design, but it gives an info text and the Add-in doesn't work:
Info text:
ADD-IN INFORMATION
This Add-in uses features not supported by its add-in catalog.
The manifest:
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="TaskPaneApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>e4a1b6ce-9333-44b5-bf03-59435dbf66ac</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>Name</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="Name" />
<Description DefaultValue="Name"/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="~remoteAppUrl/Images/Button32x32.png" />
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<AppDomains>
<AppDomain>AppDomain1</AppDomain>
<AppDomain>AppDomain2</AppDomain>
<AppDomain>AppDomain3</AppDomain>
</AppDomains>
<!--End Basic Settings. -->
<!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
<Hosts>
<Host Name="Document" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="~remoteAppUrl/" />
</DefaultSettings>
<!-- End TaskPane Mode integration. -->
<Permissions>ReadWriteDocument</Permissions>
<!-- Begin Add-in Commands Mode integration. -->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<!-- The Hosts node is required. -->
<Hosts>
<!-- Each host can have a different set of commands. -->
<!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
<!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
<Host xsi:type="Document">
<!-- Form factor. Currently only DesktopFormFactor is supported. -->
<DesktopFormFactor>
<!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
<GetStarted>
<!-- Title of the Getting Started callout. resid points to a ShortString resource -->
<Title resid="Name.GetStarted.Title"/>
<!-- Description of the Getting Started callout. resid points to a LongString resource -->
<Description resid="Name.GetStarted.Description"/>
<!-- Point to a url resource which details how the add-in should be used. -->
<LearnMoreUrl resid="Name.GetStarted.LearnMoreUrl"/>
</GetStarted>
<!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
Think of the FunctionFile as the code behind ExecuteFunction. -->
<FunctionFile resid="Name.DesktopFunctionFile.Url" />
<!-- PrimaryCommandSurface is the main Office Ribbon. -->
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
<OfficeTab id="TabHome">
<!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
<Group id="Name.Group1">
<!-- Label for your group. resid must point to a ShortString resource. -->
<Label resid="Name.Group1Label" />
<!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
<!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
<Icon>
<bt:Image size="16" resid="Name.tpicon_16x16" />
<bt:Image size="32" resid="Name.tpicon_32x32" />
<bt:Image size="80" resid="Name.tpicon_80x80" />
</Icon>
<!-- Control. It can be of type "Button" or "Menu". -->
<Control xsi:type="Button" id="Name.TaskpaneButton">
<Label resid="Name.TaskpaneButton.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="Name.TaskpaneButton.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="Name.TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Name.tpicon_16x16" />
<bt:Image size="32" resid="Name.tpicon_32x32" />
<bt:Image size="80" resid="Name.tpicon_80x80" />
</Icon>
<!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<!-- Provide a url resource id for the location that will be displayed on the task pane. -->
<SourceLocation resid="Name.Taskpane.Url" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<!-- You can use resources across hosts and form factors. -->
<Resources>
<bt:Images>
<bt:Image id="Name.tpicon_16x16" DefaultValue="~remoteAppUrl/App_Data/img/Name_logo_16.png" />
<bt:Image id="Name.tpicon_32x32" DefaultValue="~remoteAppUrl/App_Data/img/Name_logo_32.png" />
<bt:Image id="Name.tpicon_80x80" DefaultValue="~remoteAppUrl/Images/Button80x80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Name.DesktopFunctionFile.Url" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html" />
<bt:Url id="Name.Taskpane.Url" DefaultValue="~remoteAppUrl/" />
<bt:Url id="Name.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="Name.TaskpaneButton.Label" DefaultValue="Templates" />
<bt:String id="Name.Group1Label" DefaultValue="Name" />
<bt:String id="Name.GetStarted.Title" DefaultValue="Name templates" />
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="Name.TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
<bt:String id="Name.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
<!-- End Add-in Commands Mode integration. -->
</OfficeApp>
I'm assuming it's the manifest file that's causing this. I'm not sure what's wrong with this file, as I followed the default tutorials and file -> new project in Visual Studio.
Add-in command annotations are not supported in the SharePoint add-in Catalog. The only deployment option that will support add-in commands in the short term (other than the store) is our new Office 365 Centralized Deployment Tool, who is in preview right now. Check out the documentation here. (Note that the preview is for now only available on these geographies: US,CA,GB,AU,Ireland and NZ. )
That said, you can still use the SP-Based catalog, but you will need to remove the add-in commands annotations from the manifest (all the overrides), and users will need to go to the insertion dialog to insert your add-in.
Please make sure to consult this page for all the deployment options for add-ins and important remarks about each of them.

Umbraco Custom 404 Error Page Not Working

I am using using Umbraco 4.7 and my server is IIS7 was wondering what is not going right for me. I basically want to make a custom error page (404) and everything I have tried is not working, checked the forums, but it is still showing the same problem.
I have edited my umbracoSettings.config
<errors>
<!-- the id of the page that should be shown if the page is not found -->
<!-- <errorPage culture="default">1647</errorPage> -->
<!-- <errorPage culture="en-US">1647</errorPage> -->
<error404>1647</error404>
</errors>
Also I have looked about saying adding this to the web.config file.
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/error.aspx" responseMode="ExecuteURL" />
</httpErrors>
Any help would highly appreciated. I am a complete novice to IIS and anything involving network settings.
Make sure that 1647 is node id of the 404 page.
Also add the below code in the system.webServer tag in your web.config.
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="400" path="/404" responseMode="ExecuteURL" />
<error statusCode="404" path="/404" responseMode="ExecuteURL" />
</httpErrors>
Hope this works...
Just in case someone stumbles across this like I did when researching a similar problem with Umbraco 7, setting trySkipIisCustomErrors value to true in config/umbracoSettings.config file did it for me.
<web.routing
trySkipIisCustomErrors="true"
internalRedirectPreservesTemplate="false">
</web.routing>
I experienced the same problem, and the solution suggested by Sobin P Samuel worked for me (just copy and paste the httpErrors element directly to the system.webserver section in your Web.Config-file), so I guess this is also what resolved it for paulstewart185...
Please note that according to http://our.umbraco.org/wiki/install-and-setup/configuring-404-pages the solution for IIS 7.5 would be to add the following to the system.webserver section:
<httpErrors existingResponse="PassThrough"/>