How to use the next-auth/client.useSession function in next-auth

To help you get started, we’ve selected a few next-auth examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hashicorp / boundary / website / components / auth-indicator / index.jsx View on Github external
export default function AuthIndicator() {
  const [session, loading] = useSession()
  if (loading) return `Loading...`
  return (
      {session &amp;&amp; (
            Signed in as {}
            <button size="small" title="{`Sign">