Using a *.net domain as site URL or app domain - facebook-javascript-sdk

I'm trying to register an application so that I can implement log in with facebook on my site. The problem is that my domain ends with a .net hence I get an Error
App Domains: ****.net is not a valid domain.
Site URL is not a valid URL.
What could be the problem because when I use .com everything works fine.

Related

app.UseHttpsRedirection() is redirecting to "underlying" hostname not "request" hostname

Background
I have an Azure App Service hosted at myazurewebsite.azurewebsites.net.
The Azure App Service Startup class contains the line app.UseHttpsRedirection().
If I type http://myazurewebsite.azurewebsites.net into a browser, it redirects to https://myazurewebsite.azurewebsites.net - great!
I have DNS CNAME mydns.mycoolserver.com which references the above App Service.
If I type https://mydns.mycoolserver.com into a browser, then the browser shows my app service, and the address bar of the browser shows https://mydns.mycoolserver.com and all is good.
Problem
If I type http://mydns.mycoolserver.com into a browser, then the address bar of the browser shows https://myazurewebsite.azurewebsites.net.
So, it seems to me that the UseHttpsRedirection middleware has worked, but that it is redirecting to the "underlying" hostname, not the "original" hostname.
Note: in reality there is a Standard Akamai CDN in between myazurewebsite and mydns, so mydns is pointing to the CDN endpoint (myazurewebsite.azureedge.net) not the actual app service. Standard Akamai CDN doesn't have a rules engine so it isn't capable of doing http->https redirect, so I assume that it is the app.UseHttpsRedirection that is doing the redirect.
Anyway, in the above scenario, how can I get http://mydns.mycoolserver.com to redirect to https://mydns.mycoolserver.com?

Can't update app registered in Microsoft Application Registration Portal

I have an already registered app in the site https://apps.dev.microsoft.com. I want to add another redirect URL but when I tried saving I get this error:
There's a temporary problem
There's a temporary problem with the service. Please try again. If you continue to get this message, try again later.
I have also tried using a different browser and clearing my cache but I still get the error.
I also tried registering a new app and I still get the same error. I have been getting the error for several days now and I was wondering if anybody knows a solution.
Thanks!
There are several restrictions on the format of the redirect URI that is allowed
Currently, apps that are registered in the Application Registration Portal are restricted to a limited set of redirect URI values. The redirect URI for web apps and services must begin with the scheme https, and all redirect URI values must share a single DNS domain. For example, you cannot register a web app that has one of these redirect URIs:
https://login-east.contoso.com
https://login-west.contoso.com
The scenarios that are accepted are when the DNS name matches exactly. Examples:
https://login.contoso.com
https://login.contoso.com/new
https://new.login.contoso.com
See all the v2.0 limitations

Issue in setting redirect URL in OneDrive application

I have Integrated OneDrive with my web application, on my local machine
for testing I had used http://localhost:123/Web/xyz in redirect URL on Application Registration Portal and it worked fine, but now I have deployed ny application on local server for further testing before going live and wanted to update Redirect URL to http://abc-xyz:81/Web/example and it gives error "Your URL can't contain a query string or invalid special characters."
how can I fix this issue
That error message is unfortunate. The error here is likely that redirect URLs for non-localhost servers need to be HTTPS and it looks like you are using an HTTP URL.
They have restriction about setting new redirect urls, it must be either
match the DNS name of the existing
sub domain of exiting
see https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-limitations#restrictions-on-redirect-uris for more details

hybridauth: redirect URI is not whitelisted in the app

i am configuring single sign on feature with hybridauth plugin. It took me 2 days setup this. However, i am getting redirect uri error with facebook and google.
In google and facebook i have given website name like this http://example.com
i didn't found anywhere to put redirect url.
Now when i click on facebook or google. I am getting below error.
URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings.
Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs.
Google error is below.
400. That’s an error.
Error: redirect_uri_mismatch
Login page exist on root and there is a folder i have created for hybridauth.
Inside that folder index.php file.
In config.php file. i have given baseurl like this.
"base_url" => "http://example.com/hybridauth/index.php",
I know this question doesn't have much code. But as per me issue with base_url and facebook/google oauth api.
You should be able to set Authorized redirect URIs on the provider's page. For example, on Google's Developer Console, you should be able to set the Authorized redirect URIs on the Credentials tab for your app:

Facebook apps on a domain with URL forwarding and masking

I'm developing a web application with Facebook Javascript SDK on my server at http://example.com/webapp/. Now I registered a new domain name, say domain.com, with no hosting, and I forwarded with URL masking domain.com to example.com/webapp/, so the web app is still on my server at example.com/webapp/. I've tried to change app settings on Facebook, site domain to domain.com and website URL to domain.com, but the Javascript SDK doesn't work!
I think that the problem is that requests to facebook comes from my server at example.com and the app domain is domain.com. I notice that the JS SDK uses window.location to retrieve the url to be matched with the app domain and website url.. Is there a way to inject the redirect_uri parameter on every JS SDK functions call with the url of my redirecting domain domain.com?
Thanks to all in advice!
Instead of using URL Masking / Forwarding, you should see if you can use your domain domain.com pointing straight to example.com/webapp using Add-on Domains.
I.e. create a virtual host and have the new domain link to the actual files on the old domain name. Fowarding isn't the best way as some forwards use iframes or javascript to redirect.