Authors:
Cameron Johns, Cille Schliebitz, Anita Gu
Changed on:
3 Feb 2025
`useAuth` hook provided by the Component SDK, which grants access to crucial information about the currently logged-in user. We'll learn how to retrieve user details, including roles/permissions and the current location/retailer context. Specifically for location-context web apps like Fluent Store, we'll focus on using this hook to access the currently selected store's information, such as longitude and latitude coordinates, which will be essential for our map implementation.`useAuth` Hook Purpose: The useAuth hook provides a convenient way to access details about the authenticated user, including their roles, permissions, and current context.`useAuth` hook provided by the SDK, which provides details about the logged-in user. This includes details about their current roles/permissions, the location or retailer context they are in, as well as the ability to switch contexts.In location-context web apps (like Fluent Store), you can use this hook to retrieve information about the currently logged in store location, including longitude and latitude coordinates which will be useful for our map.