Skip to content
Snippets Groups Projects

Polished auth flow including ReservedRoute and role selection.

Merged Defendi Alberto requested to merge feature/privateroute/role into dev
7 files
+ 61
43
Compare changes
  • Side-by-side
  • Inline
Files
7
+ 8
0
import axios from 'axios';
/**
* Ask the server all the roles of an user if the user has multiple roles.
* @returns array of roles.
*/
export const getRoles = async (): Promise<string[]> =>
axios('/api/web/login/get_roles').then((res) => res.data.roles);
Loading