vuejs / vuefire

🔥 Firebase bindings for Vue.js
https://vuefire.vuejs.org
MIT License
3.82k stars 323 forks source link

How to Initialize Auth With indexedDBLocalPersistence in Nuxt? #1351

Closed posva closed 7 months ago

posva commented 1 year ago

Discussed in https://github.com/vuejs/vuefire/discussions/1349

Originally posted by **aaronksaunders** April 17, 2023 ``` const auth = initializeAuth(getApp(), { persistence: indexedDBLocalPersistence, }); ``` I am working with the Nuxt Ionic Module running the application on the device and getting errors if I dont initialize auth as above. Is there some way to pass configuration information into the module to control how auth is initialized?
SendDerek commented 1 year ago

Potentially useful SO discussion. Looks like Firebase SDK v9 requires the indexedDBLocalPersistence persistence. https://stackoverflow.com/a/72044685/1238704

aaronksaunders commented 1 year ago

I ended up just instantiating auth separately until this is fixed. It does diminish some of the value of using it until this feature is available IMHO

SendDerek commented 1 year ago

@aaronksaunders Did you end up using Pinia to store the auth and current user objects? That's the direction I'm looking at going.

aaronksaunders commented 1 year ago

https://youtu.be/TNzgPdkr9HM

No I didn’t, I created compostable a to manage the state.

On Fri, Jun 16, 2023 at 12:09 PM Derek Hildreth @.***> wrote:

@aaronksaunders https://github.com/aaronksaunders Did you end up using Pinia to store the auth and current user objects? That's the direction I'm looking at going.

— Reply to this email directly, view it on GitHub https://github.com/vuejs/vuefire/issues/1351#issuecomment-1594924536, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEAFGIQWTZXEZ3JD4H27PLXLSAKLANCNFSM6AAAAAAXDS5G6Q . You are receiving this because you were mentioned.Message ID: @.***>

--

--

Aaron K. Saunders CEO Clearly Innovative Inc @.*** www.clearlyinnovative.com

This email message and any attachment(s) are for the sole use of the intended recipient(s) and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient(s), please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachment(s) to the original message.