Visiting any URL except the landing page will re-direct to 404 - github-pages

I have deployed my React.tsx project to Github Pages and it has successfully been deployed. You can visit the site on the initial view and re-direct yourself throughout the application routes, but when trying to initially visiting any other URL except the landing page you get re-directed to a 404(file not found) page.
Issue: If you visit any other URL initially except the landing-page you get re-directed to a 404.
If you click on 'Contact' you will get re-directed to the contact-page, but if you try to initially visiting that page(reloading) you will get re-directed to a 404. Meaning you can only visit the website with the URL to the landing page.
How can this properly be configurated so that any URL of the application can be visited initially?

Related

Create cookie on domain that is other than parent page in ITP enabled Safari browser

Use case:
Two separate websites and does NOT share any common domain or sub-domain.
A.com is one web site
B.com is other one .
In A.com , under iframe B.com page is loaded .
B.com script needs to create cookie under b.com domain. This is working fine other than Safari 12 browser.
Safari has ITP 2.1 policy which prevents cookie creation other than parent page domain.
If I visit B.com explicitly in browser and then it allows to create cookie.
I do not have control over server side code. any client side option to workaround that mimic that user has visited B.com ?
posting fake form to b.com from iframe
or
Does 302 redirect work? ( create url
www.B.com?redirect=a.com which redirect back to a and in response ask browser to set cookie)
does it allows only HTTPonly cookie from server side response?
Any input on this will be great.

Can't Load URL - facebook login on the app

I am trying to implement fb login on my game https://ski-jumps.pl.
I prepared the application (settings below) and the script here: https://ski-jumps.pl/facebook.php
Unfortunately when I try to log in this app, a message is displayed: "Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings."
What am I doing wrong? Some ideas?
application settings
I had the same problem, struggled for hours. I fixed it by providing following url in the Valid OAuth Redirect URIs of the Facebook Login product
https://mysubdomain.azurewebsites.net/signin-facebook
Regard the signin-facebook, which isn't something I provide. I found this is the url of the Facebook error page.

Testing facebook login on django development server

I am trying to integrate facebook login in my django app but everytime I click on facebook login button it gives me an error
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
I my app settings my site url is
http://localhost:8000/
and also in my hosts file localhost have been mapped to 127.0.0.1
how to solve this as I have followed similar questions on stack but none helped a lot.
In your host file, set the localhost:port to the domain you wish to log in from.
Then, set the Facebook app's domain to the domain you've pointed your localhost to.

Given URL is not allowed by the Application configuration, Nginx appending :8001 to the URL when signin request goes to Facebook

I've added facebook login to my site. However, when I click the signin button, I get a red box that says:
'Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.'
When I dig deep, I find that my Nginx server is sending a request to facebook from http://mydomain.com:8001/usersignin, I believe facebook doesn't accept :8001 in the URL, How can I prevent :8001 appending to the URL ?
See the port_in_redirect directive

Chrome extension popup, 302,301 redirect for django authentication

I have a chrome extension that when clicked, opens the popup which initiates an xmlhttprequest to a django website.
If the user is logged in, it displays a page and everything works fine.
Else, it redirects the user (301) to the authentication page. This also works
This is where im stuck for a while:
When the user submits the wrong credentials, the popup goes to the failed login page.(200) <- good
If the credentials are correct, it seems as if nothing happens and the user is stuck on the login page even though there was a successful authentication and a cookie is set.
in the background i can see that after the post there is a 302 redirect to the post authentication page. in django, the ?next page.
Any ideas as for why it happens?
At first i thought it might be related to the 302 redirect so i changed the auth class to return 301 on a successful login but it didnt help.
The issue was that the first redirect came from the popup.html and the second one originated from the website.
I had to move the login form to the popup.html file.
http://www.w3.org/TR/2009/WD-XMLHttpRequest-20090820/