dashpresshq/dashpress

View on GitHub
src/frontend/hooks/auth/useAuthenticateUser.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { AuthActions } from "./auth.actions";

export function useAuthenticateUser() {
  return (authToken: string, rememberMe: boolean) => {
    AuthActions.setAuthToken(authToken, rememberMe);

    AuthActions.signIn();
  };
}