Configure user authentication
Hydrogen includes built-in support for managing user authentication, including account creation, login, password reset, and logout. This guide describes additional configurations for user authentication.
Retrieve a customer access tokenAnchor link to section titled "Retrieve a customer access token"
You can retrieve a customer access token using the
useSession hook. If the
customerAccessToken isn't defined, then the user isn't logged in.
Tell bots not to index a pageAnchor link to section titled "Tell bots not to index a page"
Pages that require authentication shouldn't be indexed by bots. For example, bots shouldn't index login and account pages. You can tell bots to not index a page by passing
noindex to the