As per the Firebase documentation on self hosted helper files for signInWithRedirect, we have added the files to proper directories i.e. /__/auth/ and /__/firebase/ as seen below. We have added to the public directory as a build process is involved for the React app.
For the deployed version to work and fix files being downloaded without being processed we have to update nginx config.
But it never works, the redirect does happen but the result inside getRedirectResult is always null
To make the redirect work, we had to rename handler to handler.html and iframe to iframe.html. However, there are no clear instructions on how to test this login locally from Firebase, which I find disappointing.
With these also the result is the same. This is such a big issue and I want to know why there is no traction on this from Firebase. This is a dealbreaker for the Enterprise use case. Related issue: #8329
Steps and code to reproduce issue
Below is the code for initiating the signInWithRedirect
const auth = getAuth(app);
const result = await signInWithRedirect(auth, provider);
And in App.js we are observing the redirect response
Operating System
macOS 15.0.1
Environment (if applicable)
Chrome 130, Edge 130, Firefox,
Firebase SDK Version
10.14.1 & 11.0.1
Firebase SDK Product(s)
Auth
Project Tooling
React app with webpack
Detailed Problem Description
As per the Firebase documentation on self hosted helper files for signInWithRedirect, we have added the files to proper directories i.e.
/__/auth/
and/__/firebase/
as seen below. We have added to thepublic
directory as a build process is involved for theReact
app.For the deployed version to work and fix files being downloaded without being processed we have to update
nginx
config.But it never works, the redirect does happen but the result inside
getRedirectResult
is alwaysnull
To test it locally we used
mkcert
to enable HTTPS but still, the result was the same. Steps to enable HTTPS are below:package.json
To make the redirect work, we had to rename
handler
tohandler.html
andiframe
toiframe.html
. However, there are no clear instructions on how to test this login locally from Firebase, which I find disappointing.With these also the result is the same. This is such a big issue and I want to know why there is no traction on this from Firebase. This is a dealbreaker for the Enterprise use case. Related issue: #8329
Steps and code to reproduce issue
Below is the code for initiating the
signInWithRedirect
And in App.js we are observing the redirect response
The result is always null.