My website is hosted with Firebase. It offers https out of the box. When a user hits http://example.com, it redirects to https://example.com with 307 code (Temporarily Moved). As per various SEO guidelines, this is not good practice. How to configure firebase to use 301 (Permanently Moved)?
I just tested this out on a Firebase Hosting site and (after disabling my browser extensions) I got a 301 redirect, not a 307.
What are you using to inspect the status code? Web browsers sometimes report a 307 status code when there's an internal redirect within the browser itself before it sends the request.
Chrome for example calls this kind of pre-request redirect a
307 Internal Redirect, but in actuality there is no "real" HTTP request or status code. A redirect of this sort is usually caused by HSTS on the server. HSTS is a security feature that Firebase Hosting uses.
In any case, a
307 internal redirect cannot affect SEO because it happens within the browser itself. So unless you are getting some other kind of 307, it's nothing to worry about.