SignedIn

The SignedIn component renders content for the current user. It is a wrapper around the userStore. If the user is not signed in, the children will not be rendered.

Slot Props

  • user - The current Firebase user
  • auth - The current Firebase auth instance
  • signOut - A function to sign out the current user

Example

<script>
    import { SignedIn } from 'sveltefire';
</script>

<SignedIn let:user>
    <p>Howdy, {user.uid}</p>
</SignedIn>


<SignedIn let:signOut>
    <button on:click={signOut}>Sign Out</button>
</SignedIn>