Closed splacentino closed 1 year ago
I'm not sure how we'd handle this. This library relies on client-side Firebase authentication state as the source of truth for whether a user is authenticated or not. Even if we unset the user's auth cookies, how would we handle the user still being logged in on the client side?
You can redirect to client "logout" page and client will also log out the user
Closing this: this library will continue to rely on the client-side Firebase state as the source of truth for authentication.
Describe the bug Some API call made in
getServerSideProps
can lead to an invalidation of the authorized user. User should be logout & redirected to login page.AuthUser.signOut
has not effectVersions
next-firebase-auth
version:1.0.0-canary.18
Firebase JS SDK:9.14.0
Next.js:12.3.1
To Reproduce Steps to reproduce the behavior:
/
with agetServerSideProps
wrapped inwithAuthUserSSR
./login
with agetServerSideProps
wrapped inwithAuthUserSSR
+ content wrapped inwithAuthUser
(for redirection only)./
Expected behavior Describing a flow on "how to signOut from server side & redirect to
/login
page with cleared user".Debug and error logs No error logs.
Additional context
Login page (
/login
):Main page (
/
):Edit (additional question): How to perform an additional async check on freshly loggedIn user to possibly revoke access ?