Task: I need to retrieve roles of the users in non-react functions on the client (SPA)
Context: For react components i use:
import { useAuth0 } from "@auth0/auth0-react";
const { user } =
useAuth0();
const roles = (user?.["mydomain"] as string[]) || undefined;
How can i achieve same thing in non-react functions? I thought maybe somehow extract instance of AuthService from and use it somehow?