diff --git a/gatsby-theme-auth0/README.md b/gatsby-theme-auth0/README.md index 7ddfec9..b550568 100644 --- a/gatsby-theme-auth0/README.md +++ b/gatsby-theme-auth0/README.md @@ -47,6 +47,27 @@ module.exports = { }; ``` +Set up your login/logout buttons and you're good to go! + +```jsx +import React from "react"; +import { AuthService, useAuth } from "gatsby-theme-auth0"; + +export default () => { + const { isLoggedIn, profile } = useAuth(); + return ( +
+ {profile &&

Hello {profile.name}

} + {isLoggedIn ? ( + + ) : ( + + )} +
+ ); +}; +``` + ### Theme options | Key | Default | Required | Description |