mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Switch to authentication using bearer token.
This commit is contained in:
parent
698d4d2687
commit
d8e831db50
8 changed files with 33 additions and 35 deletions
|
|
@ -7,6 +7,8 @@ import Icon from 'components/common/Icon';
|
|||
import User from 'assets/user.svg';
|
||||
import Chevron from 'assets/chevron-down.svg';
|
||||
import styles from './UserButton.module.css';
|
||||
import { removeItem } from 'lib/web';
|
||||
import { AUTH_TOKEN } from 'lib/constants';
|
||||
|
||||
export default function UserButton() {
|
||||
const user = useSelector(state => state.user);
|
||||
|
|
@ -30,7 +32,8 @@ export default function UserButton() {
|
|||
|
||||
function handleSelect(value) {
|
||||
if (value === 'logout') {
|
||||
router.push('/logout');
|
||||
removeItem(AUTH_TOKEN);
|
||||
router.push('/login');
|
||||
} else if (value === 'profile') {
|
||||
router.push('/settings/profile');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue