Custom UI Solution Not Found #459
-
Hi there, I've seen similar discussion posts, but none actually get to the meat of what I'm looking for. I've gotten the example up and running, and integrated it successfully into a prototype app.
What is not clear to me, is what to do from an unauthed context. There is no documentation regarding login, either with providers or credentials, and the given example uses a very abstracted and somewhat plain UI solution. I tried something like this: import { getAuth, signInWithEmailAndPassword } from "firebase/auth";
...
const auth = getAuth();
signInWithEmailAndPassword(auth, email, password)
.then(async (userCredential) => {
But i'm not sure where to go from here. I know that there is some interaction with the
What am I doing wrong? :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @jamie-legg, what you're looking to do should be pretty easy. This library listens to the Firebase JS SDK for a login. It doesn't care how your login process works as long as the Firebase user is logged in (and Firebase's By default, this library automatically handles making the login API call after the user logs in. For your app, a few things to check:
I suggest building off the demo with your own signup flow to see where things break. If you keep having problems, please share a reproduction here in case others can lend a hand. |
Beta Was this translation helpful? Give feedback.
Hey @jamie-legg, what you're looking to do should be pretty easy. This library listens to the Firebase JS SDK for a login. It doesn't care how your login process works as long as the Firebase user is logged in (and Firebase's
onIdTokenChanged
is triggered). The login UI in the demo is just a handy shortcut but isn't required.By default, this library automatically handles making the login API call after the user logs in.
For your app, a few things to check:
next-firebase-auth
and usewithAuthUser
on the login pages too, where the user will typically be unauthenticated. This will allow this library to respond to the login.