This repo contains a minimal reproduction of a bug that exists in the interaction between ember-simple-auth
and firebase
, as implemented in the ember-cloud-firestore-adapter
addon.
The application has a very basic authentication flow. A login page has pre-populated credentials, which match those of a user in the emulator. Once logged in, the user is redirected to authenticated.index
and their displayName
from firebase auth should be visible. Upon logout, the user is redirected to the login page.
In terms of ember-simple-auth
, this repo includes a custom authenticator. However, it is a copy of the default provided by ember-cloud-firestore-adapter
but with some logging. Essentially, I believe this highlights an issue for anyone using the default authenticator.
- clone the repo
npm install
- in individual terminal windows, run each of these commands:
ember serve
andfirebase emulators:start --import=test-data
- open a browser and navigate to
http://localhost:4200
, and open your console to view logs - repeat step 4 in a second browser tab
- in the first browser tab, click "Submit" - it will not log you in
- check the console on the second tab; you will see the following error:
The authenticator "authenticator:test-firebase" rejected to restore the session - invalidating…
- return to the first tab and click "Submit" again, and check the console in both tabs; you should see a that the console is logging continuously as the application gets stuck in a loop
- click the "Logout" link to invalidate the session