I am new to reactjs and Firebase web hosting.
I am using Sketchfab OAuth2 for my web. So, I need to provide a redirect link to Sketchfab, e.g. https://projectname.firebaseapp.com/redirect
However, I am using react-router
and no matter what pages I routed to, there is a '#' in the url, e.g. https://projectname.firebaseapp.com/#/login and https://projectname.firebaseapp.com/#/redirect. This makes me cannot get the OAuth token from Sketchfab because my url and the redirect url are not match.
I have requested to use https://projectname.firebaseapp.com/#/redirect as the redirect url. However, Sketchfab does not support having '#' in the redirect url.
Possible solution to this problem:
- Find a way to remove the '#' from my url
- Make use of firebase.json to rewrite the destination of all
**/redirect/**
source to the https://projectname.firebaseapp.com/#/redirect
For option 2, I don't know how to do this in reactjs since I only know how to rewrite the destination to a html file, e.g. /index.html
This is the theme I am using for my web: https://startreact.com/themes/ani-theme/