klopt
todo
firebase support
What we want is a login object which can be used like this:
What we really want is to instantiate a login object and start it. Now this will be different for various applications, but it will mostly have a login button, logout button, a logged out screen and a logged in startscreen.
We could dispose of the buttons and just provide a build function for both screens and hook .login and .logout to those buttons.
loginbutton.addEventListener("click", login.login) logoutbutton.addEventListener("click", login.logout)
The Login object should just login to google, and start the loggedin function and that remember the state and name, so we need :
problem with firebase auth
index.esm2017.js:78 [2022-09-14T20:27:36.434Z] @firebase/auth: Auth (9.9.4): INTERNAL ASSERTION FAILED: Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill
It seems that firebase is trying to use fetch() (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) for some of it's error functionalities.
FirebaseError: Firebase: Error (auth/network-request-failed).
at createErrorInternal (tasks.bundle.js:4369:41)
at _fail (tasks.bundle.js:4340:11)
at _performFetchWithErrorHandling (tasks.bundle.js:4879:9)
at async _validateOrigin (tasks.bundle.js:9144:35)
The function _performFetchWithErrorHandling would suggest so.
here is a little explanation about it though it targets internet explorer sadly.
The question here is should we just prevent the error or more on the auth/network-request-failed
As i cannot get the vue version to work either i defer this to a later stage.