I use a third party authentication service which returns an access_token in URL upon successful authentication.
Interesting thing is that everything is working perfectly fine on my dev machine but when published to production, it doesn't handle the path and I end up with the generic 404.html page on the server which tells me that React Router simply is not handling this route.
The callback looks like this in the URL:
https://myapp.com/login#access_token=somereallylongstring&scope=openid%20profile%20email&expires_in=7200&token_type=Bearer&state=anotherreallylongstring
The route I defined in my app for login looks like below:
<Route path="/login">
<Login />
<Route>
Again, this works fine locally. What am I missing here?
P.S. My version of React Router in package.json is "react-router-dom": "^5.1.2"
UPDATE: I figured out why this is happening but not sure what the solution is.
I'm doing static website hosting through my Azure Blob Storage which understands that index.html is the web page it is supposed to serve. It also understands the concept of serving web pages based on URL in the request. So, when the callback comes back as https://myapp.com/login#..., it looks for the login.html page but doesn't find it so it displays the generic 404.html page.
Right now, I'm not sure what the solution is so I'd appreciate any suggestions.