Use Emulator #63
-
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
You can still initialize Firebase yourself (both JS SDK and admin SDK), before you call |
Beta Was this translation helpful? Give feedback.
-
I don't. I have been using firebase and next-firebase-auth for a week now,
so I'd need to dig into it.
The emulator is under pretty active development and it seems validating jwt
was added only two weeks ago. The docs aren't reflecting this yet, however.
One step towards emulator compatibility would be to offer setting a flag in
the config and then piping that to the initializeApp calls. However, the
admin SDK is a bit picky about this and basically wants it to be set as
environment variable. I can provide a sample app in the coming days.
…On Tue, Feb 23, 2021, 23:04 Kevin Jennison ***@***.***> wrote:
Got it. Do you have suggestions on how to emulate that server-side API
behavior, or do Google/Firebase have any tools that might help? Happy to
see how we can make this package compatible, if possible.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#63 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABNTSDUGBUYULLW3BBBDO4DTAQQ77ANCNFSM4YCNQLZA>
.
|
Beta Was this translation helpful? Give feedback.
-
Quick and dirty, it could look like this: https://github.com/gladly-team/next-firebase-auth/compare/main...Parnswir:emulator-poc?expand=1 To start the emulator, download the firebase CLI, cd to the example directory of the repo and run
The basics work, but then the errors start rolling in. Some are probably connected to the example app, but as described above, setAuthCookie will always call the (live) identitykit instead of the emulator. |
Beta Was this translation helpful? Give feedback.
-
Just an FYI - I was able to get server-side refresh tokens working with the emulator by tweaking the verification url. I just submitted a PR to this effect. Hopes this resolves the issue! |
Beta Was this translation helpful? Give feedback.
Just an FYI - I was able to get server-side refresh tokens working with the emulator by tweaking the verification url. I just submitted a PR to this effect. Hopes this resolves the issue!