mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
10 lines
424 B
TypeScript
10 lines
424 B
TypeScript
import {configureAuth} from '@hilla/react-auth';
|
|
import {UserEndpoint} from 'Frontend/generated/endpoints';
|
|
|
|
// Configure auth to use `UserInfoService.getUserInfo`
|
|
const auth = configureAuth(UserEndpoint.getUserInfo);
|
|
|
|
// Export auth provider and useAuth hook, which are automatically
|
|
// typed to the result of `UserInfoService.getUserInfo`
|
|
export const useAuth = auth.useAuth;
|
|
export const AuthProvider = auth.AuthProvider; |